macteo / Marklight

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

anchorPattern matches inner parens pairs #12

Open DivineDominion opened 7 years ago

DivineDominion commented 7 years ago

Just noticed that anchorPattern is seemingly supposed to match [title][anchor]-style links while anchorInlinePattern matches [title](http://example.com)-style links.

Still, anchorPattern uses parenRegex to match round parens on its inside.

Thinking about it, I would simply remove that part. Was there an edge case you wanted to handle with that code, @macteo? If so, I'll write tests for that case to make sure that no refactoring breaks the existing stuff.

macteo commented 7 years ago

It can be definitely removed as far as I understand!