Skip to content

GitHub CSS for [ and ] around footnote calls interfering with user content #238

@wooorm

Description

@wooorm

(Note: this is more an issue with GH CSS rather than cmark-gfm or GFM)

Users are able to write HTML in markdown on GitHub. For example:

Hi, <sup><a href="#">world</a></sup>

The new footnotes use similar markup and use CSS to add brackets around footnote:

.markdown-body sup > a::before {
  content: "[";
}
.markdown-body sup > a::after {
  content: "]";
}

This results in the previous markdown being rendered as:

Hi, world

Would it perhaps make sense to use:

[data-footnote-ref]::before {
  content: "[";
}
[data-footnote-ref]::after {
  content: "]";
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions