Open ichirou2910 opened 4 years ago
Thanks for the feedback. I even didn't know that (single dollar blocks) is a valid syntax.
âSingle dollar signs math blockâ is actually inline math or bug.
Simply check the HTML output. Display math areas (math blocks) are wrapped in <span class="katex-display">
, while inline math areas are not.
Before proceeding, here is an essential problem:
What's the definition of âspace characterâ?
This extension now depends on markdown-it-katex
which follows pandoc's convention:
Anything between two
$
characters will be treated as TeX math. The opening$
must have a non-space character immediately to its right, while the closing$
must have a non-space character immediately to its left, and must not be followed immediately by a digit. Thus,$20,000 and $30,000
wonât parse as math. If for some reason you need to enclose text in literal$
characters, backslash-escape them and they wonât be treated as math delimiters.
Traditionally, line feed is regarded as a kind of space character. However, markdown-it-katex
currently allows one line feed next to the $
, which leads to âsingle dollar signs math blockâ:
(This is just a piece of the code. The whole problem may be related to more parts.)
We have to first make it clear whether it's a bug or feature.
I think it is more of an unexpected "feature" than a bug. But I do recommend using $inline math$
instead of multiple lines.
What is the problem?
I want to request the hightlighting and auto-suggestion of a math block that starts and ends with a single dollar sign (not inline math) just like normal math block between 2 double dollar signs
How can I reproduce it?
Put a math block between 2 single dollar signs so that it's left aligned
Is there any error message in the console?
none