You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Subscript extension (~) breaks table cell boundary parsing when combined with bold (**) #932
When the subscript extension is enabled (via UseAdvancedExtensions() or UseEmphasisExtras()), an unclosed tilde (~) inside a bold-wrapped table cell (e.g., **~$1.50**) causes the table parser to produce phantom TableCell nodes, inflating the column count.
Every row gets a phantom 4th cell. The cell content is also garbled — text from adjacent cells bleeds across boundaries.
Isolation tests
Input pattern in cell
Subscript ext
Columns
Result
**$1.50** (bold only)
enabled
3
Correct
~$1.50 (tilde only)
enabled
3
Correct
**~$1.50** (bold + tilde)
enabled
4
Broken
**~$1.50** (bold + tilde)
disabled
3
Correct
The bug only manifests when both bold (**) and an unclosed subscript delimiter (~) appear together in a table cell.
Real-world impact
~$1.50 (meaning "approximately $1.50") is a common notation in tables, especially cost/pricing summaries with bold total rows:
|**Total**|**~$0.0015**|**~$1.50**|
Environment
Markdig: 0.45.0
.NET: 8.0
OS: macOS (Darwin 25.3.0)
Current workaround
Use UseEmphasisExtras(EmphasisExtraOptions.Strikethrough) instead of the default EmphasisExtraOptions.Default to disable the subscript extension while keeping strikethrough support.
Activity
Kryptos-FR commentedon Apr 18, 2026
Alternative workaround: escape the
~characters when inside the bold section:Shown to work in babelmark.
Fix pipe table cells with unmatched subscript (#932)
xoofx commentedon Jun 13, 2026
Fixed via 0f98267