cebe / markdown

A super fast, highly extensible markdown parser for PHP
http://markdown.cebe.cc/
MIT License
997 stars 141 forks source link

better parsing for nested elements with emph, strong and links #26

Open cebe opened 10 years ago

cebe commented 10 years ago

https://github.com/karlcow/markdown-testsuite https://github.com/erusev/parsedown/issues/107#issuecomment-35362535

cebe commented 10 years ago

MD: **[**FOO**](/bar/)** Expected: <p><strong><a href="/bar/"><strong>FOO</strong></a></strong></p>

MD: **em <a href="#" alt="*">*em*</a>** Expected: <strong>em <a href="#" alt="*"><em>em</em></a></strong>

cebe commented 9 years ago

http://johnmacfarlane.net/babelmark2/?normalize=1&text=**[**FOO**]%28%2Fbar%2F%29**%0A%0A**em+%3Ca+href%3D%22%23%22+alt%3D%22*%22%3E*em*%3C%2Fa%3E**%0A

cebe commented 9 years ago

another example, thanks @philsturgeon

http://johnmacfarlane.net/babelmark2/?normalize=1&text=_This+RFC+adds+a+new+operator+%28%60%3C%3D%3E%60%29+for+combined+comparison.+Similar+to+%60strcmp%28%29%60+or+%60version_compare%28%29%60+in+behavior%2C+but+it+can+be+used+on+all+generic+PHP+values+with+the+same+semantics+as+%60%3C%60%2C+%60%3C%3D%60%2C+%60%3D%3D%60%2C+%60%3E%3D%60%2C+%60%3E%60._

cebe commented 6 years ago

https://johnmacfarlane.net/babelmark2/?normalize=1&text=text+*+this+is+italic+*+something