macteo / Marklight

Markdown syntax highlighter for iOS
Other
638 stars 44 forks source link

Difference between strict and non-strict bold and italic #11

Open DivineDominion opened 7 years ago

DivineDominion commented 7 years ago

There's a strict bold pattern matched first, then a non-strict applied afterwards. Can you explain why? (I'm considering writing tests for this.)

It makes sense to have multiple passes when you convert the string to HTML and some non-strict bold emphasis is left over in the end, but in this case it is probably redundant. I don't know for sure, though, until I tinkered with this some more.

macteo commented 7 years ago

Unfortunately I cannot explain it: I've taken the regexes from Markingbird.