styleguidist/react-styleguidist

Down-level headings in markdown files

Open

#634 geöffnet am 11. Okt. 2017

Auf GitHub ansehen
 (5 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (1.416 Forks)github user discovery
enhancementhelp wantedrequest for comments

Repository-Metriken

Stars
 (11.091 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Currently when headings are rendered in markdown files, they are rendered as-is (i.e. an h1 in a markdown file gets rendered as an h1 in the styleguide). However, the sections titles also use headings, so you can get strange behaviour such as an h1 being rendered inside a section with an h3 title, when it should be an h4.

A solution to this is to just start the headings in the markdown files at the appropriate size, but this gets tedious to update when moving sections around (i.e. moving a top-level section to a sub-section).

It would be nice if the headings in the markdown were automatically "down-levelled", I.e. h1 elements inside a markdown file inside a section with an h3 heading were converted to h4 elements.

Contributor Guide