Skip to content

Markdown loader fails on <http://url> links. #222

@millette

Description

@millette

🐛 Describe the bug

Loading markdown files with the mdx plugin for <http://example.com> links.

32 |  * @param {TokenType} tagExpressionAttributeMarkerType
33 |  * @param {TokenType} tagExpressionAttributeValueType
34 |  * @param {TokenType} tagAttributeType
35 |  * @param {TokenType} tagAttributeNameType
36 |  * @param {TokenType} tagAttributeNamePrimaryType
37 |  * @param {TokenType} tagAttributeNamePrefixMarkerType
            ^
37:8: Unexpected character `/` (U+002F) before local name, expected a character that can start a name, such as a letter, `$`, or `_` (note: to create a link in MDX, use `[text](url)`)
 ancestors: undefined,
     cause: undefined,
     fatal: undefined,
      file: "",
     place: {
  _bufferIndex: 7,
  _index: 10,
  line: 37,
  column: 8,
  offset: 2233,
},
    reason: "Unexpected character `/` (U+002F) before local name, expected a character that can start a name, such as a letter, `$`, or `_` (note: to create a link in MDX, use `[text](url)`)",
    ruleId: "unexpected-character",
    source: "micromark-extension-mdx-jsx",
    actual: undefined,
  expected: undefined,
      note: undefined,
       url: "https://github.com/micromark/micromark-extension-mdx-jsx#unexpected-character-at-expected-expect",

      at /home/millette/brain-mmmr/node_modules/micromark-extension-mdx-jsx/lib/factory-tag.js:37:8

Bun v1.3.0 (Linux x64)

Removing the mdxJsx plugin enabled the file to be parsed.

I will submit a PR to make plugins customizable if that's an acceptable solution.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions