- Notifications
You must be signed in to change notification settings - Fork1
It converts HTML to Markdown based on remark and rehype.
License
NotificationsYou must be signed in to change notification settings
inkdropapp/html2markdown
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
It converts HTML to Markdown usingremark andrehype.
npm install @inkdropapp/html2markdown
Say we have the following markdown file,example.md
:
<h1>Hello, world!</h1>
And our script,example.js
, looks as follows:
import{html2Markdown}from'@inkdropapp/html2markdown'importfsfrom'fs'constdoc=fs.readFileSync('example.md')constmd=html2Markdown(doc)console.log(md)
Now, runningnode example
yields:
#Hello,world!
Converts the given HTML to Markdown.
options.toMdast
— The options forhast-util-to-mdastoptions.stringify
— The formatting options formdast-util-to-markdown
About
It converts HTML to Markdown based on remark and rehype.
Topics
Resources
License
Stars
Watchers
Forks
Packages0
No packages published