Redocly / Redocly/redoc

Strange rendering of Markdown when headers has similar text

Open
#2,491 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

Describe the bug
For some reason when H2 header repeats with similar text, Redoc Standalone JS parses Markdown and adds content to next section.

Please note that if I change first header from Fiskaly ES to Fiskaler ES, than everything is working fine.

*Minimal reproducible OpenAPI snippet

This is the OpenAPI content (partial):

    "info": {
        "version": "local",
        "title": "Our API Documentation",
        "description": "\n# Integrations\n\n## Fiskaly ES  \nSome Description  \n## Fiskaly  \nSome Description  \n## Oracle Netsuite  \nSome Description  "
    },

Screenshots
Screenshot 2024-02-15 at 10 53 43
Screenshot 2024-02-15 at 11 05 31
Screenshot 2024-02-15 at 11 01 45

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 the minimal OpenAPI snippet in the issue and reproduce it in Redoc Standalone JS, comparing the rendering of the similar H2 headings. Trace the Markdown heading parsing or section-rendering entry point responsible for the misplaced content. Done means headings such as “Fiskaly ES” and “Fiskaly” render separate sections with their own descriptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.