[PR #519] [MERGED] ADD: Markdown.ToHtml from MarkdownDocument #1074

Open
opened 2026-01-29 14:49:22 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/519
Author: @grishat
Created: 3/7/2021
Status: Merged
Merged: 3/9/2021
Merged by: @xoofx

Base: masterHead: document-to-html


📝 Commits (2)

  • d17660f ADD: Markdown.ToHtml from MarkdownDocument (already parsed Markdown text)
  • 4324caa Update src/Markdig/Markdown.cs

📊 Changes

1 file changed (+23 additions, -1 deletions)

View changed files

📝 src/Markdig/Markdown.cs (+23 -1)

📄 Description

Hello. In my case, I had to add additional classes in html elements. And the best way, in my opinion, was to add attributes on parsed document, and then render this one. And I added this missed method.
Code in my local project:

if (inline is LinkInline link)
{
   link.GetAttributes()
      .AddClass("mud-typography mud-link mud-primary-text mud-link-underline-hover mud-typography-body1");
}

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/xoofx/markdig/pull/519 **Author:** [@grishat](https://github.com/grishat) **Created:** 3/7/2021 **Status:** ✅ Merged **Merged:** 3/9/2021 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `document-to-html` --- ### 📝 Commits (2) - [`d17660f`](https://github.com/xoofx/markdig/commit/d17660fe5d56fc4ec2c556097c343812afe862e7) ADD: Markdown.ToHtml from MarkdownDocument (already parsed Markdown text) - [`4324caa`](https://github.com/xoofx/markdig/commit/4324caaaea77aafc990b77c91614c5cc427b0607) Update src/Markdig/Markdown.cs ### 📊 Changes **1 file changed** (+23 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/Markdig/Markdown.cs` (+23 -1) </details> ### 📄 Description Hello. In my case, I had to add additional classes in html elements. And the best way, in my opinion, was to add attributes on parsed document, and then render this one. And I added this missed method. Code in my local project: ``` if (inline is LinkInline link) { link.GetAttributes() .AddClass("mud-typography mud-link mud-primary-text mud-link-underline-hover mud-typography-body1"); } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 14:49:22 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1074