Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
tidy-markdown
Advanced tools
Beautify Markdown, fixing formatting mistakes and converting basic HTML & Unicode into their Markdown equivalents. Based on the conventions in Carrot Creative's Markdown Styleguide and built on Marked.
There is also an Atom Plugin to run this entirely within your editor.
Tidy Markdown is an npm package, so it can be installed like this:
npm install tidy-markdown -g
Tidy Markdown includes a simple CLI. It operates entirely over STDIN/STDOUT. For example:
$ echo "# a header #" | tidy-markdown
# a header
Or using a file:
$ tidy-markdown < ./ugly-markdown
# Some markdown
Lorem ipsum dolor adipiscing
- one
- two
- three
And, of course, we can output to a file too:
$ tidy-markdown < ./ugly-markdown > ./clean-markdown
The --help
arg will make it show a usage page:
usage: tidy-markdown [-h] [-v] [--no-ensure-first-header-is-h1]
fix ugly markdown.
Optional arguments:
-h, --help Show this help message and exit.
-v, --version Show program's version number and exit.
--no-ensure-first-header-is-h1
Disable fixing the first header when it isn't an H1.
This is useful if the markdown you're processing
isn't a full document, but rather a piece of a larger
document.
Tidy Markdown only exports one function, that takes one argument (the string of ugly markdown). Here's an example of how it can be used:
tidyMarkdown = require 'tidy-markdown'
uglyMarkdown = '''
# Some markdown #
Lorem ipsum dolor adipiscing
- one
* two
+ three
'''
cleanMarkdown = tidyMarkdown(uglyMarkdown)
console.log cleanMarkdown
which outputs:
# Some markdown
Lorem ipsum dolor adipiscing
- one
- two
- three
h1
followed by an h4
would be corrected to an h1
followed by an h2
).FAQs
Fix ugly markdown.
The npm package tidy-markdown receives a total of 78 weekly downloads. As such, tidy-markdown popularity was classified as not popular.
We found that tidy-markdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.