
Company News
Socket Has Acquired Secure Annex
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.
@jwerre/markdown_to_array
Advanced tools
Convert markdown text to a simplified DOM array. Previously markdown_to_html
Convert markdown text to a simplified DOM array.
npm install --save @jwerre/markdown_to_array
@jwerre/markdown_to_array instead of markdown_to_array
MdToArray = require('markdown_to_array')
const md = `\
This is *italics* and this is **bold**.
- list item 1
- list item 2
- list item 3
Here is a [hyperlink](https://example.com)!
Here are some **images**: 
`;
const mdDom = new MdToArray(md);
const parsed = mdDom.parse();
console.log(parsed);
[
[
{ text: 'This is ', tag: 'P', P: true },
{ text: 'italics', tag: 'EM', EM: true },
{ text: ' and this is ', tag: 'P', P: true },
{ text: 'bold', tag: 'STRONG', STRONG: true },
{ text: '.', tag: 'P', P: true }
],
[
{ text: 'list item 1', tag: 'LI', LI: true },
{ text: 'list item 2', tag: 'LI', LI: true },
{ text: 'list item 3', tag: 'LI', LI: true }
],
[
{ text: 'Here is a ', tag: 'P', P: true },
{
text: 'hyperlink',
tag: 'A',
A: true,
href: 'https://example.com'
},
{ text: '!', tag: 'P', P: true }
],
[
{ text: 'Here are some ', tag: 'P', P: true },
{ text: 'images', tag: 'STRONG', STRONG: true },
{ text: ': ', tag: 'P', P: true },
{
tag: 'IMG',
IMG: true,
src: 'https://example.com/img1.png',
alt: 'some alt text'
}
],
[
{
tag: 'IMG',
IMG: true,
src: 'https://example.com/img2.png',
alt: ''
}
]
]
FAQs
Convert markdown text to a simplified DOM array. Previously markdown_to_html
The npm package @jwerre/markdown_to_array receives a total of 1 weekly downloads. As such, @jwerre/markdown_to_array popularity was classified as not popular.
We found that @jwerre/markdown_to_array 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.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.

Product
Reachability analysis for PHP is now available in experimental, helping teams identify which vulnerabilities are actually exploitable.