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

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

Original Pull Request: https://github.com/xoofx/markdig/pull/519

State: closed
Merged: Yes


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");
}
**Original Pull Request:** https://github.com/xoofx/markdig/pull/519 **State:** closed **Merged:** Yes --- 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"); } ```
claunia added the pull-request label 2026-01-29 14:49:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1079