styleguidist/react-styleguidist

Down-level headings in markdown files

Open

#634 建立於 2017年10月11日

在 GitHub 查看
 (5 留言) (0 反應) (0 負責人)TypeScript (1,416 fork)github user discovery
enhancementhelp wantedrequest for comments

倉庫指標

Star
 (11,091 star)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南