Skip to content

foo^*^ should not be converted to superscript according to spec #6

Description

@aboks

The commonmark spec for emphasis/strong (https://spec.commonmark.org/0.30/#emphasis-and-strong-emphasis) specifies in its rules that in foo*a* the first * opens emphasis, but in foo*_* it doesn't. This is because it is not a left-flanking delimiter run, as it is followed by punctuation, but not preceded by punctuation or whitespace.

In the same fashion, it would make sense for sup (and in the same sense probably also for sub) to follow the same rules, i.e. to convert foo^a^ to superscript, but not foo^*^. Pandoc, from which the superscript syntax is borrowed, also honors these rules (as can be seen in https://pandoc.org/try/).

Would it be possible to change this extension so that this rule from the spec is honored and foo^*^ is converted to <p>foo^*^</p> instead of superscript?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions