Skip to content

[fuzz result] what even is [^]? #749

@notriddle

Description

@notriddle

The following input markdown:

Test [^] link

[^]: https://github.com

Produces different output depending on how things are set up and which implementation you use:

  • In pulldown-cmark with footnotes turned off, it thinks [^] is a link.
  • In pulldown-cmark with footnotes turned on, it thinks [^] is plain text. That's probably a bug, since nobody else does that.
  • Commonmark.JS (which does not support footnotes), thinks [^] is a link
  • In pandoc commonmark (footnotes turned off), it thinks [^] is a link.
  • In pandoc commonmark_x (footnotes turned on), it thinks [^] is a footnote.
  • In pandoc flavored markdown (footnotes turned on, not commonmark) it thinks [^] is plain text. It's the only other implementation I know of that acts like this, and it's not a commonmark implementation.
  • In GitHub Gist (footnotes turned on), it thinks [^] is a link.
  • In markdown-it1 normal mode (footnotes turned on), it thinks [^] is a link
  • In markdown-it strict mode (footnotes turned off), it thinks [^] is a link
  • In Hugo (easiest way I knew of to try goldmark, because I couldn't find an online dingus; footnotes are enabled), it thinks [^] is a link

The smart money is on making it act as a link.

Details

Events from pulldown-cmark:

"[^]:\n" -> [
  Start(Paragraph)
    Text(Boxed("[^]:"))
  End(Paragraph)
]

Events from pandoc:

"[^]:\n" -> [
]

AST from pandoc:

Pandoc {
    meta: {},
    blocks: [],
}

Footnotes

  1. Markdown-It is the parser used in hackmd and discourse.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions