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

Clumsy attempt to add subscript support #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mdaeron
Copy link

@mdaeron mdaeron commented Aug 12, 2021

This PR adds support for subscripts, using a tilde notation equivalent to the superscript ^:

  • N~2 --> N2
  • H~(2)O) --> H2O

For now superscripts and subscripts are activated together by the --superscript option.

The problem is that --superscript now disables --strikethrough, which also uses tilde (e.g., ~~foo~~ --> foo).

I'm worthless with C code, so I couldn't find a way to fix --strikethrough while preserving subscripts. Any help would be much appreciated, even if it's not merged here (I'd be fine with building my own tweaked version of MacDown for personal use).

@uranusjr
Copy link
Member

Could you explain a bit the rationale of choosing ~ for this? It feels slightly foreign to me; LaTeX, which also uses ^ for superscript, uses _ instead. I am not sure what other Markdown renderers tend to use (IIRC CommonMark does not support either).

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

Successfully merging this pull request may close these issues.

2 participants