jellypbc / poster

Jelly demo toy app that turns PDFs into editable posts
https://jellypbc.com
Other
22 stars 3 forks source link

User can unintentionally create a math inline node when typing content between two $ #406

Open cindywu opened 3 years ago

cindywu commented 3 years ago

When a user types in the editor any content between two $ will turn into a math inline node. This is problematic when a user tries to write a sentence such as:

We consistently spend $10,000/month make $15/month from 3 GitHub sponsors.

Our editor evaluates 10,000/month make as a math inline node. 🤦🏻‍♀️

I'm not exactly sure what the ideal UX is here. Typora has the same bug.

Kapture 2021-02-04 at 18 17 07

typora: Kapture 2021-02-04 at 18 21 29

alexkrolick commented 3 years ago

Can you escape out of it using \$?

alexkrolick commented 3 years ago

https://katex.org/docs/autorender.html#api

It might use KaTeX under the hood, in which case you can turn off matching $..$ and use $$..$$ only