I am trying to replicate Markdown Markdown editor. I tried to change WMD, not to reinvent the wheel, but its code cannot be read to me ...
Therefore, I am trying to enable italics " *", but not bold " **"
So, the italics below should be removed
this *is a* test
this ***is a*** test
But below should be untouched
this **is a** test
I think I should use RegExp, but how? How can I compare *only if it is “one” or 2 or more follow it*
source
share