Maths parsing problem #385

Closed
opened 2026-01-29 14:35:30 +00:00 by claunia · 2 comments
Owner

Originally created by @NaolShow on GitHub (Jul 21, 2020).

Hi everyone, I have a problem with the parsing of the mathematics.
For exemple if I have this in markdown:

# Testing mathematics
$0$ or $2x$

The title will be parsed correctly, but I'll also have: 0 or 2x
(In the html source code: <p>$0$ or $2x$</p>)

I'm using a pipeline:
var Pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().UseBootstrap().UseEmojiAndSmiley().UseSoftlineBreakAsHardlineBreak().Build();

Do you know what is the problem ?
Thanks a lot ! :)

Originally created by @NaolShow on GitHub (Jul 21, 2020). Hi everyone, I have a problem with the parsing of the mathematics. For exemple if I have this in markdown: ``` # Testing mathematics $0$ or $2x$ ``` The title will be parsed correctly, but I'll also have: $0$ or $2x$ (In the html source code: ```<p>$0$ or $2x$</p>```) I'm using a pipeline: ```var Pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().UseBootstrap().UseEmojiAndSmiley().UseSoftlineBreakAsHardlineBreak().Build();``` Do you know what is the problem ? Thanks a lot ! :)
claunia added the bugPR Welcome! labels 2026-01-29 14:35:30 +00:00
Author
Owner

@xoofx commented on GitHub (Jul 21, 2020):

Looks like a bug but can't recall what would be the cause of the problem. It seems to work fine with spaces around the number (e.g $ 0 $)
Don't have time to investigate issues these days for markdig, so if you feel to investigate this, you are welcome :)

@xoofx commented on GitHub (Jul 21, 2020): Looks like a bug but can't recall what would be the cause of the problem. It seems to work fine with spaces around the number (e.g `$ 0 $`) Don't have time to investigate issues these days for markdig, so if you feel to investigate this, you are welcome :)
Author
Owner

@davidackroyd99 commented on GitHub (Jul 21, 2020):

I will have a look and see if I can raise a pr

@davidackroyd99 commented on GitHub (Jul 21, 2020): I will have a look and see if I can raise a pr
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#385