Closed seiyab closed 9 months ago
Hi
The behavior is intended. Pandoc is not a reference. How code works in CommonMark is a reference.
`20,000 and `30,000
20,000 and
30,000
You can escape dollars and backticks in markdown if you want:
\`20,000 and `30,000
`20,000 and `30,000
You can also turn off singleDollarTextMath
in this extension. This is what I would recommend to everyone. With that, math is unlikely to interfere with regular text. That is also how I implemented syntax highlighting, which is used in places where math may or may not work, such as right here:
$math?$
$$math?$$
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.
The PR you reference also says what I say now. Pandoc is not a reference. https://github.com/remarkjs/remark-math/pull/35
Thank you for your response. I understand. I'm working on Prettier and will suggest turning off singleDollarTextMath
with breaking change or having our own tokenizer.
Older remark-math handled it same as pandoc: https://github.com/remarkjs/remark-math/pull/35. I consider this a regression.
Initial checklist
Affected packages and versions
remark-math 6.0.0
Link to runnable example
Codesandbox
Steps to reproduce
Codesandbox
Expected behavior
It shouldn't parse as math.
Actual behavior
parses as inline math.
Runtime
No response
Package manager
No response
OS
No response
Build and bundle tools
No response