Autolinks match inside code blocks #287

Closed
opened 2026-01-29 14:32:48 +00:00 by claunia · 2 comments
Owner

Originally created by @Tyrrrz on GitHub (Apr 5, 2019).

Autolinks shouldn't match on text inside inline or fenced code blocks.

GitHub's behavior:

Normal: https://www.google.com/

Inline: https://www.google.com/

Fenced:

https://www.google.com/
Originally created by @Tyrrrz on GitHub (Apr 5, 2019). Autolinks shouldn't match on text inside inline or fenced code blocks. GitHub's behavior: Normal: https://www.google.com/ Inline: `https://www.google.com/` Fenced: ``` https://www.google.com/ ```
Author
Owner

@MihaZupan commented on GitHub (Apr 5, 2019):

As far as I can tell, that's exactly what Markdig is doing
See babelmark

@MihaZupan commented on GitHub (Apr 5, 2019): As far as I can tell, that's exactly what Markdig is doing See [babelmark](https://babelmark.github.io/?text=Autolinks+shouldn%27t+match+on+text+inside+inline+or+fenced+code+blocks.%0A%0AGitHub%27s+behavior%3A%0A%0ANormal%3A+https%3A%2F%2Fwww.google.com%2F%0A%0AInline%3A+%60https%3A%2F%2Fwww.google.com%2F%60%0A%0AFenced%3A%0A%60%60%60%0Ahttps%3A%2F%2Fwww.google.com%2F%0A%60%60%60)
Author
Owner

@Tyrrrz commented on GitHub (Apr 5, 2019):

This is embarrassing. You are right, sorry. This was caused by a client-side library. 😳

@Tyrrrz commented on GitHub (Apr 5, 2019): This is embarrassing. You are right, sorry. This was caused by a client-side library. 😳
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#287