Skip to content

A remark plugin for replacing the first heading in a markdown document

License

Notifications You must be signed in to change notification settings

laat/remark-first-heading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A remark plugin for replacing the first heading in a markdown document

Resources

License

Stars

Watchers

Forks

Packages

No packages published