Skip to content

fix: replace UseAdvancedExtensions with selective pipeline to fix phantom table columns (#68)#69

Merged
forest6511 merged 1 commit into
mainfrom
feature/fix-table-bold-tilde-phantom-columns
Mar 16, 2026
Merged

fix: replace UseAdvancedExtensions with selective pipeline to fix phantom table columns (#68)#69
forest6511 merged 1 commit into
mainfrom
feature/fix-table-bold-tilde-phantom-columns

Conversation

@forest6511
Copy link
Copy Markdown
Owner

Summary

  • Fixes Workaround: Markdig subscript extension (~) breaks table cell parsing with bold (**) #68: Bold markers (**) combined with tilde (~) inside table cells caused Markdig to create phantom columns
  • Root cause: UseAdvancedExtensions() enables the subscript extension where ~ is a delimiter. When **~$1.50** appears in a table cell, the subscript parser interferes with cell boundary detection, inflating column count
  • Fix: Replace UseAdvancedExtensions() with explicit extension registration, using UseEmphasisExtras(EmphasisExtraOptions.Strikethrough) to keep ~~strikethrough~~ support while disabling subscript (~) and superscript (^)

Test plan

  • 302 tests passing (297 existing + 5 new regression tests)
  • Verified: bold-only tables parse correctly (3 columns)
  • Verified: tilde-only tables parse correctly (3 columns)
  • Verified: bold+tilde combination now parses correctly (3 columns, was 4)
  • Verified: ~~strikethrough~~ still works in tables
  • Verified: literal ~ preserved in cell text

…ntom table columns (#68)

Markdig's subscript extension (~) causes misparse of table cell boundaries
when tilde appears inside bold markers (e.g., **~$1.50**), creating extra
phantom columns. Replace UseAdvancedExtensions() with explicit extension
registration, enabling only strikethrough (~~) via EmphasisExtraOptions.
@forest6511 forest6511 merged commit ba18498 into main Mar 16, 2026
1 check passed
@forest6511 forest6511 deleted the feature/fix-table-bold-tilde-phantom-columns branch March 16, 2026 02:37
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.69%. Comparing base (e6e81ce) to head (5873c57).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #69      +/-   ##
==========================================
+ Coverage   88.54%   88.69%   +0.15%     
==========================================
  Files          27       27              
  Lines        1405     1424      +19     
  Branches      179      179              
==========================================
+ Hits         1244     1263      +19     
  Misses        122      122              
  Partials       39       39              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workaround: Markdig subscript extension (~) breaks table cell parsing with bold (**)

1 participant