I want to know how does the stackoverflow parser works, and how to imitate it.
That is, this
or this or this or link.
I mean, it's pretty obvious but I would want a JavaScript function
that turned this:
[Google](http://www.google.com)
*italic*
**bold**
`customStyle`
Into this:
<a href="http://www.google.com">Google</a>
<span style="font-style:italic">italic</span>
<span style="font-weight:bold">italic</span>
<span class="custom">customStyle</span>
I was going to use regex but aside from them being somewhat complicated, after going through a couple of "parsing html" (not exactly what I was looking for) posts, like The Answer I got discouraged.
So, how should I go about making a parser?