4
4
4eloBek2015-08-25 17:30:33
JavaScript
4eloBek, 2015-08-25 17:30:33

Why is $1 in replace not doing its job?

Task: to make an automatic insertion of a drop cap in the visual editor.
Solution methods: through replace.
Tell me what's wrong here? O_o

Here is the code on jsfiddle.com

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Aves, 2015-08-25
@4eloBek

\s this

[ \f\n\r\t\v​\u00a0\u1680​\u180e\u2000​-\u200a​\u2028\u2029\u202f\u205f​\u3000\ufeff]

\u200Bit does not include
/<br>[\s\u200B]*([^<])/gworks

D
Dmitry, 2015-08-25
@mytmid

line 12 /\<br\>\s*([^<])/gwithout quotes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question