Skip to content

fix: change markdown renderer behavior #1323

Description

@alexdln

I noticed that the current approach to Markdown generation is that we first iterate through the Markdown and collect all the information from it, and then, in a new cycle, we iterate through the HTML and collect a small portion of the information from it.

Because of this, we run the risk of different behavior between the generation in GitHub and our own. I've definitely pinpointed the risk we have when generating the ToC, the order of headings, and the IDs in content-repeating headings.

Image Image

Source github / npmx

With the current solution, we can handle this for HTML headings, but it will be after all other elements and incorrect.

It's important to loop through all elements in a single loop

One more example of partially missed logic - eslint for platinum sponsor link

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backServer, DatafrontFrontend, Designp2Priority 2 bug (medium)

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions