Add Markdown component using Markdig and HTML pipeline#42
Add Markdown component using Markdig and HTML pipeline#42LittleLittleCloud merged 14 commits intomainfrom
Conversation
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
|
@copilot
|
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
Refactored to use the markdown-to-HTML approach with the existing pipeline (commit a0d0598). The implementation now:
Lists are already working via |
|
@copilot yes, implement the remaining html unsupported tag |
…te, hr, p) Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
Implemented all remaining HTML translators (commit bf3150c): Added translators:
All markdown elements now render properly: Headings are colored (yellow for h1, cyan for h2, green for h3), code blocks have syntax highlighting, blockquotes are indented, and horizontal rules display as separators. |
LittleLittleCloud
left a comment
There was a problem hiding this comment.
@copilot I think tag p already supported, can you confirm?
src/RazorConsole.Core/Vdom/Translators/HtmlParagraphElementTranslator.cs
Show resolved
Hide resolved
|
@copilot I think the tag 'p' already supported? |
You're correct that Markdown generates
Both translators are needed: the original for simple text-only paragraphs (used by other components), and the new one as a fallback for HTML-generated paragraphs with inline formatting. |
…r for improved rendering; update Program.cs to use App component
Overview
This PR adds a new
Markdowncomponent to RazorConsole that parses and renders markdown content using Markdig by converting markdown to HTML and leveraging the existing HTML rendering pipeline.What's New
Markdown Component
The new
<Markdown>component allows you to render markdown content directly in your console applications:Supported Features
SyntaxHighlightingServiceExample