
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
markdown-ast
Advanced tools
Fork of snarkdown that returns an array of AST nodes, instead of an HTML string.
TypeScript support included!
import md from 'markdown-ast'
const ast = md(code)
The goal is to support Github-style markdown. Please file an issue if you run into any inconsistencies.
Â
\n chars are removed from the start/end of plain text.Â
Every node has a type property equal to one of these:
bold: __text__ or **text**border: 3+ character sequence of [*-_] w/ optional spaces betweenbreak: \n\n or \r\n\r\n or \s\s\n or \s\s\r\ncodeBlock: triple backticks or 4-spaces/tab indentedcodeSpan: inline backticksimage:  or ![alt][key] or just ![altAsKey]italic: _text_ or *text*link: [text](url) or [text][key] or just [textAsKey]linkDef: [key]: urllist: markdown w/ [-+*]|\d+[\.\)] prefixquote: markdown w/ > prefixstrike: ~~text~~texttitle: markdown w/ #{1,6} prefix or underlined w/ 3+ =|- symbolsAvailable properties are defined here.
Â
"Block nodes" have a block property containing any nested nodes. Blocks are
auto-closed when their parent block is closed (unless the nested block is
already closed, of course).
Some nodes (which may not be blocks) auto-close all open blocks. These
include border, break, list, quote, and title nodes.
"Inline blocks" can be used anywhere in the document. These include bold,
codeSpan, image, italic, link, and strike nodes.
"Recursive blocks" use their own parsing context to process any nested nodes.
These include list, quote, and title nodes.
FAQs
Markdown AST parser
The npm package markdown-ast receives a total of 1,982 weekly downloads. As such, markdown-ast popularity was classified as popular.
We found that markdown-ast 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
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.