[PR #47] Fixes issue where trailing text after an inline math block is both included in the math block and appended after the math block. #785

Closed
opened 2026-01-29 14:45:28 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/xoofx/markdig/pull/47

State: closed
Merged: Yes


I found an issue where inline math with trailing text both included the text inside the maths block and outside the maths block.

For example:

This is a $math block$ with text on both sides.

Should render as

<p>This is a <span class="math">math block</span> with text on both sides.</p>

But instead we get

<p>This is a <span class="math">math block$ with text on both sides.</span> with text on both sides.</p>
**Original Pull Request:** https://github.com/xoofx/markdig/pull/47 **State:** closed **Merged:** Yes --- I found an issue where inline math with trailing text both included the text _inside_ the maths block and _outside_ the maths block. For example: ``` This is a $math block$ with text on both sides. ``` Should render as ``` html <p>This is a <span class="math">math block</span> with text on both sides.</p> ``` But instead we get ``` html <p>This is a <span class="math">math block$ with text on both sides.</span> with text on both sides.</p> ```
claunia added the pull-request label 2026-01-29 14:45:28 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#785