nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.08k stars 622 forks source link

markdown parsing fails for links with scheme in their text segment #737

Closed pi0 closed 3 years ago

pi0 commented 3 years ago

Version

@nuxt/content: ^1.11.1 nuxt: 2.14.12

Reproduction Link

Related issue: https://github.com/nuxt/nuxtjs.org/pull/1194

What is Expected?

Markdown parsing works for links that their title is starting with an scheme (http://)

What is actually happening?

Parsing does not happens for markdown style links

AlexanderBelokon commented 3 years ago

Hey! I've looked at this issue, and it's a bug in micromark-extension-gfm-autolink-literal, there's even an unfinished pull request to fix it. According to @ChristianMurphy's comment, pinning it at 0.5.4 or 0.5.3 should fix this problem

AlexanderBelokon commented 3 years ago

I've confirmed pinning micromark-extension-gfm-autolink-literal@0.5.4 fixes this issue with the following addition to package.json:

  "resolutions": {
    "*/**/micromark-extension-gfm-autolink-literal": "0.5.4"
  }

but this is yarn-specific. Should I submit a pull request with this fix, or is there a better, universal way to do this?

atinux commented 3 years ago

Thank you for looking at it @AlexanderBelokon, much appreciated :blush:

I think we can wait for https://github.com/micromark/micromark-extension-gfm-autolink-literal/pull/6#issuecomment-770799771 to be fully resolved before :)

pi0 commented 3 years ago

sandbox recreated to use latest version of micromark-extension-gfm-autolink-literal (0.5.6) with fix. I have another issue now /en/index Not Found. Trying to investigate...

pi0 commented 3 years ago

For some reason sandbox still broken but working fine locally so issue is resolved by dep