msmid / markdown2docbook

Conversion tool for transforming markdown text files to DocBook/HTML documents. Project is based on XSLT 2.0 technology.
MIT License
21 stars 6 forks source link

Regex for finding HTML not matching whole html #38

Closed msmid closed 10 years ago

msmid commented 10 years ago

Html regex matches first ocurence of closing tag eg. Two nested divs are matched only as far as inner div closing tag occurs.

<div>
    <div>text</div>
</div>

will match

<div><div>text</div>
msmid commented 10 years ago

As original markdown library hints, I should use two regular expressions. One for nested html and one for simplier structure.