Mathpix / mathpix-markdown-it

Markdown rendering + Latex extras (equations, tables, ...), with conversion features, for the scientific community
MIT License
465 stars 42 forks source link

【BUG】math inline mode with whitespace not parse #301

Open xiaoyvyv opened 5 months ago

xiaoyvyv commented 5 months ago

the math code is in $ but with whitespace is not render

below is ok

hello math  $ax^2+bx+c=0$

below is bad

hello  math  $ ax^2+bx+c=0  $

hope with whitespace can render

OlgaRedozubova commented 2 months ago

@xiaoyvyv This is expected behavior. If the $...$ entry has spaces after and before the $, it will not be considered a math separator. If you need spaces for the inline math, you can use \(...\) delimiters instead of $...$

Screenshot 2024-04-23 at 09 48 03