Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 426 Bytes

readme.md

File metadata and controls

20 lines (13 loc) · 426 Bytes

remark-first-heading

Replace the first top-level heading in a markdown document

Usage

import remark from 'remark';
import firstHeading from 'remark-first-heading';

const r = remark().use(firstHeading, { heading: 'Correct Heading' });

const someMarkdown = '# wrong heading';
r.processSync(someMarkdown).toString();
//=> "# Correct Heading\n"

License

MIT © Sigurd Fosseng