xoofx / xoofx/markdig

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

Open
#688 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
C#
Stars
5.3k
Forks
510
Avg merge
8d 5h
Merged PRs (30d)
5

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/Markdig/Extensions/Footnotes/HtmlFootnoteGroupRenderer.cs, especially Renderer.WriteChildren(Footnote), and review issue #684 for the intended label-preservation behavior. Determine how the first paragraph should receive the label markup during rendering; done means the original label is preserved and appears in the first footnote paragraph.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
content
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.