retypeapp / retype

Retype is an ✨ ultra-high-performance✨ static site generator that builds a website based on simple text files.
https://retype.com
Other
1.01k stars 201 forks source link

Single characters in super- and subscript #695

Open activivan opened 2 months ago

activivan commented 2 months ago

While subscript can be achieved using ~im below~, superscript with ^up^ (as recommended in https://www.markdownguide.org/extended-syntax/#superscript) is not working.

geoffreymcgill commented 2 months ago

For me, both appear to be working correctly. Here is a sample I'm testing with...

Normal ^superscript^ and ~subscript~
Screen Shot 2024-04-16 at 9 52 18 AM
activivan commented 2 months ago

Ok, I figured it's the plus character that doesn't work, neither in subscript or superscript:

NAD^+^ or Disney~+~

grafik

activivan commented 2 months ago

It's not only +, also +,.#&%$? don't work. - does work though

geoffreymcgill commented 2 months ago

Thanks for the sample. There does appear to be an issue with the Markdown parser during that exact ^+^ scenario.

I found that if you add a space in front of the ^+^, then it does render correctly. Maybe that is at least a temp work-around for the issue.

// FAIL
NAD^+^ or Disney~+~

// PASS (add a space)
NAD ^+^ or Disney ~+~

Interestingly, using ^+^ also fails:

NAD^+^ or Disney~+~

Another work-around could be using a dagger with ^†^ instead of a +:

NAD^†^

I don't think the ^+^ is going to be a quick fix, but we will certainly look into getting this fixed for a future release.