mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-11 21:37:17 +00:00
How can i print the original Inline code instead of the converted text? #651
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 @RicBruIAI on GitHub (Jan 30, 2024).
What I am trying to do is to parse only headers and then get the original text without parsing the string.
Something like:
And I've done something like this:
But The result is:
Hello everyone this is a list: Item 1; Item 2Instead of:
Because I want to maintain the original code, then I suppose the "ToString()" is not what I am looking for.
@MihaZupan commented on GitHub (Jan 30, 2024):
Every
MarkdownObjecthas aSpanproperty that points to the section of the input string it is based on. You must specifyUsePreciseSourceLocationfor those positions to be accurate.Then you can look at the original input like so