mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-13 05:45:31 +00:00
[PR #481] [MERGED] Roundtrip implementation #1058
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?
📋 Pull Request Information
Original PR: https://github.com/xoofx/markdig/pull/481
Author: @generateui
Created: 10/3/2020
Status: ✅ Merged
Merged: 3/7/2021
Merged by: @xoofx
Base:
master← Head:cst📝 Commits (10+)
2b07e9aadd naive cst implementation147698drevert LinkInlineRendererc737853implement cst for Paragraph30f670bfix NREcd18087implement cst for header0234d60fix broken whitespace calculationf78b5c8handle whitespace before and after paragraphs correctly0d86a93fix block nodescadbc67fix newline between blocksacf2ba9allow CodeInline with multiple delimiter characters📊 Changes
112 files changed (+30724 additions, -301 deletions)
View changed files
📝
readme.md(+1 -0)➕
src/Markdig.Tests/RoundtripSpecs/CommonMark.generated.cs(+15266 -0)➕
src/Markdig.Tests/RoundtripSpecs/CommonMark.md(+9710 -0)➕
src/Markdig.Tests/RoundtripSpecs/Inlines/TestAutoLinkInline.cs(+23 -0)➕
src/Markdig.Tests/RoundtripSpecs/Inlines/TestBackslashEscapeInline.cs(+67 -0)➕
src/Markdig.Tests/RoundtripSpecs/Inlines/TestCodeInline.cs(+77 -0)➕
src/Markdig.Tests/RoundtripSpecs/Inlines/TestEmphasisInline.cs(+132 -0)➕
src/Markdig.Tests/RoundtripSpecs/Inlines/TestHtmlEntityInline.cs(+53 -0)➕
src/Markdig.Tests/RoundtripSpecs/Inlines/TestHtmlInline.cs(+27 -0)➕
src/Markdig.Tests/RoundtripSpecs/Inlines/TestImageInline.cs(+25 -0)➕
src/Markdig.Tests/RoundtripSpecs/Inlines/TestLineBreakInline.cs(+18 -0)➕
src/Markdig.Tests/RoundtripSpecs/Inlines/TestLinkInline.cs(+229 -0)➕
src/Markdig.Tests/RoundtripSpecs/Inlines/TestNullCharacterInline.cs(+37 -0)➕
src/Markdig.Tests/RoundtripSpecs/TestAtxHeading.cs(+55 -0)➕
src/Markdig.Tests/RoundtripSpecs/TestExample.cs(+54 -0)➕
src/Markdig.Tests/RoundtripSpecs/TestFencedCodeBlock.cs(+107 -0)➕
src/Markdig.Tests/RoundtripSpecs/TestHtmlBlock.cs(+20 -0)➕
src/Markdig.Tests/RoundtripSpecs/TestIndentedCodeBlock.cs(+86 -0)➕
src/Markdig.Tests/RoundtripSpecs/TestLinkReferenceDefinition.cs(+214 -0)➕
src/Markdig.Tests/RoundtripSpecs/TestNoBlocksFoundBlock.cs(+23 -0)...and 80 more files
📄 Description
Implements a CST aka LST (Complete Syntax Tree aka Lossless Syntax Tree).
Please keep the following in mind:
As such, this is a very modest first attempt to learn if a CST can be implemented in markdig while keeping the current focus on performance. I'd be happy to hear feedback about
Any feedback is highly appreciated.
For context, the usecase for this is creating bots that automatically enhance and fix markdown documentation. Think creating links automatically, fixing links automatically, inserting generated blocks of markdown code, et cetera. This requires a markdown renderer that does not change any input markdown as much as possible in the output markdown.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.