Question: inserting <sup> in the first <p> of a Footnote #583

Open
opened 2026-01-29 14:40:23 +00:00 by claunia · 1 comment
Owner

Originally created by @omer-iqbal on GitHub (Dec 18, 2022).

I am adding options in Footnote extension to preserve original label specified in markdown. (Issue #684)

I have done most of the work except I'm unable to figure out how to cleanly add <sup>label</sup> in the first paragraph of the Footnote.

HtmlGroupFootnoteRenderer has Renderer.WriteChildren(Footnote) which renders the paragraphs. I am thinking that perhaps the ideal way to do this is to add these html tags and label during rendering. Changing the Footnote text before this stage doesn't seem like an elegant way to do it.

Any help would be appreciated.

Originally created by @omer-iqbal on GitHub (Dec 18, 2022). I am adding options in Footnote extension to preserve original label specified in markdown. (Issue #684) I have done most of the work except I'm unable to figure out how to cleanly add `<sup>label</sup>` in the first paragraph of the Footnote. `HtmlGroupFootnoteRenderer` has [`Renderer.WriteChildren(Footnote)`](https://github.com/xoofx/markdig/blob/f9bed5d2705c7687a495672e84108f381c9bbd8b/src/Markdig/Extensions/Footnotes/HtmlFootnoteGroupRenderer.cs#L40) which renders the paragraphs. I am thinking that perhaps the ideal way to do this is to add these html tags and label during rendering. Changing the Footnote text before this stage doesn't seem like an elegant way to do it. Any help would be appreciated.
claunia added the question label 2026-01-29 14:40:23 +00:00
Author
Owner

@xoofx commented on GitHub (Jan 4, 2023):

I am thinking that perhaps the ideal way to do this is to add these html tags and label during rendering.

If it is not an added information to the data model, you can definitely render them directly from the renderers.

@xoofx commented on GitHub (Jan 4, 2023): > I am thinking that perhaps the ideal way to do this is to add these html tags and label during rendering. If it is not an added information to the data model, you can definitely render them directly from the renderers.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#583