mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
Bug with TableCell Span range #590
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Nintynuts on GitHub (Feb 26, 2023).
I'm parsing files located here:
https://github.com/MicrosoftDocs/win32/tree/docs/desktop-src/direct3dhlsl, so I can't modify the source file. I'm using the latest nuget release.The table is a pipe table, not an HTML one, so I'm using
.UseAdvancedExtensions()(and.YamlFrontMatter()) in my pipeline, to parse these markdown documents that contains pipe tables with some HTML in the cells. The problem is that theMarkdownObjectspan range is 10 characters too short, and doesn't include the entire cell contents.This is the table row:
I get:
Instead of:
To fix this, I checked the inlines of the paragraph block and found that the 'dest' bit was just '*', and the containing block's span only went up to this inline. To work around I used the last inline's end to determine the span instead of the provided property, which fixed my issue.
Here's the code I used to work around it:
I suspect that this is a bug, and I would appreciate it if you could investigate further and possibly fix it. Thank you for your help!
@xoofx commented on GitHub (Feb 27, 2023):
Thanks for the report.
I have no time these days working on Markdig, so PR welcome.