Comments (1)
Every MarkdownObject
has a Span
property that points to the section of the input string it is based on. You must specify UsePreciseSourceLocation
for those positions to be accurate.
private static readonly MarkdownPipeline s_pipeline = new MarkdownPipelineBuilder()
.UsePreciseSourceLocation()
.Build();
Then you can look at the original input like so
else if (element is ParagraphBlock paragraph)
{
string source = markdown.Substring(paragraph.Span.Start, paragraph.Span.Length);
// Hello **everyone** this is a list:
}
from markdig.
Related Issues (20)
- PipeTable is not parsed correctly HOT 1
- [Help] Understanding of InlineParser Implementations HOT 2
- What does the 'dig' in Markdig mean? HOT 2
- Replacing LinkInline with reference form - how? HOT 6
- RoundTrip renderer not working?, breaking changes in output. HOT 3
- Rewriting HTML output - where to start? HOT 1
- Html generated links have nofollow? HOT 3
- Apply `foreach` on `class StringLineGroup` got phantom empty line, is it expected? HOT 2
- Question: Sanitize Markdown HOT 2
- Question: Guidance on implementing Plantuml renderer HOT 3
- Unable to get original content for LinkReferenceDefinitionGroup HOT 2
- Fails to substitute (**) with <strong> tags for Japanese and Chinese languages. HOT 3
- How to make bold just a part of a word? HOT 1
- Emojis don't get converted at the start of links HOT 1
- Translate position from rendered HTML to markdown HOT 1
- Question: Having code blocks show in blocks HOT 4
- Roman Numeral V (5) is not computing correctly HOT 1
- Add support for GitHub Markdown Alerts HOT 3
- PipeTableParser strip opening and ending characters HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdig.