xoofx / xoofx/markdig

Parsing HTML into tree nodes instead of `HtmlInline` or `HtmlBlock` objects

Open
#490 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Consider parsing of the following string:

<a href="https://github.com/KvanTTT/MarkConv">Html Link</a>

The parser returns ContainerInline with the following children :

[0] = {HtmlInline} <a href="https://github.com/KvanTTT/MarkConv">
[1] = {LiteralInline} Html Link
[2] = {HtmlInline} </a>

But I want to get not just the mix of HtmlInline and other markdown objects but HTML tree-structure like this:

HtmlElement (a, href="https://github.com/KvanTTT/MarkConv"):
    LiteralInline (Html Link)

The same related to HtmlBlock:

<details>
<summary>Title</summary>

Content

</details>

Such a feature should be included in the basic library or implemented as an external extension?

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 by reproducing the inline and block HTML examples from the issue and inspect how HtmlInline, HtmlBlock, ContainerInline, and LiteralInline are represented. Determine whether nested HTML nodes belong in the basic library or an external extension; done means a documented design decision and behavior that preserves the requested tree structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, markdown
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.