xoofx / markdig

A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET
BSD 2-Clause "Simplified" License
4.41k stars 456 forks source link

Fix issues for math span calculation #785

Closed toothache closed 8 months ago

toothache commented 8 months ago

A follow up fix for #779 . Math span end position should also consider the situation when the math inline is closed with whitespace.

xoofx commented 8 months ago

I'm not sure what exactly the fix for set text heading is trying to address. The following seems to be correct for CommonMark implementations, including markdig.

toothache commented 8 months ago

I'm not sure what exactly the fix for set text heading is trying to address. The following seems to be correct for CommonMark implementations, including markdig.

markdig is parsing the second set text heading with an extra character as heading. But it shouldn't, correct?

As shown below, commonmark and markdig have different behaviors parsing the second set text heading.

... commonmark-java 0.13.0Java commonmark.js 0.28.1Javascript league/commonmark GFM 2.4.0Php league/commonmark 2.4.0Php ...

<h1>
  Hello
</h1>
<p>
  Test ===n
</p>

Results 1 implementation#4 markdig 0.35.0.0C#

<h1>
  Hello
</h1>
<h1>
  Test
</h1>
xoofx commented 8 months ago

markdig is parsing the second set text heading with an extra character as heading. But it shouldn't, correct?

Sorry, completely misread babelmark results. You are absolutely correct.

xoofx commented 8 months ago

Thanks!

toothache commented 7 months ago

Thanks!

Hi, @xoofx . Is it possible to release a new version containing the fix? Thanks!