I need to add a span to change the text color, but only when the text follow a certain format. For example:
<div>
Random text.
<br>
x. I want to add a span to this line
<br>
Not this one.
<br>
x. Yes to this.
<br>
x. And this!
</div>
In this example, I want to add a span to the lines that start with x.. I can’t change the format and the text is not inside “p”.
jsfiddle