remarkjs / remark-gfm

remark plugin to support GFM (autolink literals, footnotes, strikethrough, tables, tasklists)

Home Page:https://remark.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Markdown [https://www.twilio.com/](https://www.twilio.com/) links are not rendered as expected

sunknudsen opened this issue · comments

Subject of the issue

Let's say we have the following markdown.

Go to [https://www.twilio.com/](https://www.twilio.com/) and sign up.

[https://www.twilio.com/](https://www.twilio.com/) is rendered as [https://www.twilio.com/](https://www.twilio.com/) vs a https://www.twilio.com/ hyperlink with a https://www.twilio.com/ href.

Screen Shot 2021-01-31 at 6 37 35 PM

Your environment

  • OS: macOS Catalina 10.15.7
  • Packages: react-markdown and remark-gfm
  • Env: Node 14.15.1 and npm 6.14.11

Steps to reproduce

This should be pretty straightforward to reproduce using above markdown.

Expected behavior

[https://www.twilio.com/](https://www.twilio.com/) should be rendered as https://www.twilio.com/ hyperlink with a https://www.twilio.com/ href.

Actual behavior

[https://www.twilio.com/](https://www.twilio.com/) is rendered as [https://www.twilio.com/](https://www.twilio.com/).

The issue is related to autolink literals, this issue is being tracked at micromark/micromark-extension-gfm-autolink-literal#5 and a possible solution in the works at micromark/micromark-extension-gfm-autolink-literal#6
closing this issue, as it isn't actionable at the remark-gfm level and will be resolved in micromark-extension-gfm-autolink-literal

There's also a potential work around described here: #6 (comment)

Thanks for the heads-up @ChristianMurphy. Thankfully, I "own" the content and used \[(http.*?)\]\(\1\) to find and replace links to $1.