Skip to content

Clumsy attempt to add subscript support#3

Open
mdaeron wants to merge 1 commit into
MacDownApp:masterfrom
mdaeron:subscript
Open

Clumsy attempt to add subscript support#3
mdaeron wants to merge 1 commit into
MacDownApp:masterfrom
mdaeron:subscript

Conversation

@mdaeron

@mdaeron mdaeron commented Aug 12, 2021

Copy link
Copy Markdown

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
Copy Markdown
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