Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aboks opened this issue Apr 25, 2023 · 0 comments
Open

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

aboks opened this issue Apr 25, 2023 · 0 comments

Comments

@aboks
Copy link

aboks commented Apr 25, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant