Commit Graph
16 Commits
Author SHA1 Message Date
dualfroz 463eec7085 Fix definition lists requiring 3 spaces after the marker (#384) 2026-10-10 11:42:13 +02:00
upstream 5a326ef5b7 Upstream xoofx/markdig state of the touched files before a9eea55dcf 2026-10-10 11:42:13 +02:00
dualfroz 2b9fbfb252 Fix grid table open last cell taking a | from the next line (#494)
To find a closing `|` at the end of the last column, GridTableParser used
PeekCharExtra, which ignores the end of the slice. When the line was
shorter than the table, it could read the next line instead, and a `|`
there made the cell run past the end of the line, so the next line's
leading `|` ended up in the cell. Use PeekChar, which stays within the
current line.
2026-10-03 02:46:01 +02:00
upstream 1d93169fc0 Upstream xoofx/markdig state of the touched files before 93486bb52c 2026-10-03 02:46:01 +02:00
dualfrozandAlexandre Mutel 425c9f8a46 Fix: keep trailing content out of an unmatched emphasis closer (#743) (#950)
* fix: keep trailing content out of unmatched emphasis closer (#743)

When EnableTrackTrivia() is enabled, an emphasis closer whose delimiter
run is only partially consumed (its leftover dropping below the minimum
count) kept the inlines that follow it nested inside the emphasis. The
roundtrip renderer then emitted the closing delimiters after that
trailing content, corrupting the output, for example a grid table
separator row using the "marked" (==) delimiter from EmphasisExtras.

Move the trailing content out to the outermost enclosing emphasis when
the closer can no longer be matched, mirroring the existing handling for
a fully consumed opener. The leftover closer keeps its position, so
cases without trailing content are unaffected. Adds a regression test.

* Fix unmatched emphasis closer cleanup order (#743)

---------

Co-authored-by: Alexandre Mutel <alexandre_mutel@live.com>
2026-09-19 11:52:40 +02:00
upstream 49e145437f Upstream xoofx/markdig state of the touched files before 27b8c9eb56 2026-09-19 11:52:40 +02:00
dualfrozandAlexandre Mutel 9006f0b4a2 Fix heading auto-link hijacking nested link labels (#668) (#949)
* Fix heading auto-link hijacking nested link labels (#668)

* Refactor heading reference resolution to init-only state (#949)

---------

Co-authored-by: Alexandre Mutel <alexandre_mutel@live.com>
2026-09-19 11:41:48 +02:00
upstream 40eebc0cd8 Upstream xoofx/markdig state of the touched files before baa95a9ca3 2026-09-19 11:41:48 +02:00
dualfroz cf9456728c Fix heading auto-link hijacking nested link labels (#668) 2026-09-04 03:24:13 +02:00
upstream 10ebd55fd4 Upstream xoofx/markdig state of the touched files before 9b3347d720 2026-09-04 03:24:13 +02:00
dualfroz ad32938cc0 Fix heading auto-link hijacking nested link labels (#668) 2026-09-06 01:19:53 +02:00
upstream 93406f115e Upstream xoofx/markdig state of the touched files before 67a2e4948f 2026-09-04 03:24:13 +02:00
dualfroz 0e598ccf6f fix: keep trailing content out of unmatched emphasis closer (#743)
When EnableTrackTrivia() is enabled, an emphasis closer whose delimiter
run is only partially consumed (its leftover dropping below the minimum
count) kept the inlines that follow it nested inside the emphasis. The
roundtrip renderer then emitted the closing delimiters after that
trailing content, corrupting the output, for example a grid table
separator row using the "marked" (==) delimiter from EmphasisExtras.

Move the trailing content out to the outermost enclosing emphasis when
the closer can no longer be matched, mirroring the existing handling for
a fully consumed opener. The leftover closer keeps its position, so
cases without trailing content are unaffected. Adds a regression test.
2026-09-06 01:19:55 +02:00
upstream b022656629 Upstream xoofx/markdig state of the touched files before 0a17da190a 2026-09-02 11:59:02 +02:00
dualfroz 83afc8fa26 fix: keep trailing content out of unmatched emphasis closer (#743)
When EnableTrackTrivia() is enabled, an emphasis closer whose delimiter
run is only partially consumed (its leftover dropping below the minimum
count) kept the inlines that follow it nested inside the emphasis. The
roundtrip renderer then emitted the closing delimiters after that
trailing content, corrupting the output, for example a grid table
separator row using the "marked" (==) delimiter from EmphasisExtras.

Move the trailing content out to the outermost enclosing emphasis when
the closer can no longer be matched, mirroring the existing handling for
a fully consumed opener. The leftover closer keeps its position, so
cases without trailing content are unaffected. Adds a regression test.
2026-09-02 11:59:02 +02:00
upstream 165ebe1cf1 Upstream xoofx/markdig state of the touched files before 51b0655f4c 2026-09-02 11:59:02 +02:00