I am trying to write a blog on GitHub pages. But the GFM does not support highlight text like typora does. What I want to do is to match everything (including line breaks) in between a pair of "==". So the following text should be selected
Edit the ==Expression=
== & T==sa==ext to see matches.
and changed to
Edit the <span class="highlight">Expression=
</span> & T<span class="highlight">sa</span>ext to see matches.
What I am asking is that
- What regular expression should I use to match? I got
={2}[^=]*={2}but that's not right. - Is there any simple js I can do the replacement? I want my website to use as little JS as possible.
Thanks a lot!