mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Can source line numbers appear in the rendered output? #633
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 @deanebarker on GitHub (Oct 6, 2023).
Is there any support or extension in MarkDig for corresponding output elements with the line number from the source? This would allow finding the correct line in the source from the output (i.e. -- synchronizing scrolling of source or output elements when doing side-by-side editing).
For example:
Theoretical output:
That's just an illustration -- I'm curious if there's anything in the library or extensions that does something similar to the example.
@xoofx commented on GitHub (Oct 6, 2023):
There is the
pipeline.UsePragmaLines()extensionThis is what the Markdown Editor for Visual Studio is using for example here
@deanebarker commented on GitHub (Oct 6, 2023):
Perfect. I suspected that it existed, but I couldn't find it (TIL: what "pragma" means). Thank you.
@deanebarker commented on GitHub (Oct 6, 2023):
For anyone following this, here's what
UsePragmaLines()returns for the example above (clearly, it's 0-based):