Skip to main content

demote_headings

Function demote_headings 

pub fn demote_headings(body: &str) -> String
Expand description

Demotes every ##-or-deeper heading in a section’s body by two levels.

A section published as ### carries its own ## subsections, which have to move down with it or the page’s outline inverts. Fenced blocks are left alone.