styleguidist/react-styleguidist

Down-level headings in markdown files

Open

#634 opened on 2017年10月11日

GitHub で見る
 (5 comments) (0 reactions) (0 assignees)TypeScript (1,416 forks)github user discovery
enhancementhelp wantedrequest for comments

Repository metrics

Stars
 (11,091 stars)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド