
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
markdown-it-react-renderer
Advanced tools
Markdown to React Component converter.
This project uses Markdown parser from Markdown It library, but loosely supports its plugins.
import MDReactComponent from 'markdown-react-js';
...
render() {
return (
<MDReactComponent text='Some text **with emphasis**.' />
);
}
or, using function instead of component:
import { mdReact } from 'markdown-react-js';
...
render() {
return mdReact()('Some text **with emphasis**.');
}
Result:
<span>
<p>
Some text with <strong>emphasis</strong>.
</p>
</span>
const TAGS = {
html: 'span', // root node, replaced by default
strong: 'b',
em: 'i'
}
...
render() {
return (
<MDReactComponent text='Some **bold** and *italic* text.' tags={TAGS} />
);
}
Result:
<span>
<p>
Some <b>bold</b> and <i>italic</i> text.
</p>
</span>
function handleIterate(Tag, props, children, level) {
if (level === 1) {
props = {
...props,
className: 'first-level-class'
};
}
if (Tag === 'a') {
props = {
...props,
className: 'link-class',
href: props.href.replace('SOME_URL', 'http://example.com')
};
}
return <Tag {...props}>{children}</Tag>;
}
...
render() {
return (
<MDReactComponent text='[This link](SOME_URL) has it’s own style.' onIterate={handleIterate} />
);
}
Result:
<span>
<p class="first-level-class">
<a href="http://example.com" class="link-class">This link</a> has it’s own style.
</p>
</span>
Forked from
markdown-react-js Copyright 2015 Alexander Kuznetsov alexkuz@gmail.com
Markdown-it Copyright (c) 2014 Vitaly Puzrin vitaly@rcdesign.ru, Alex Kocharin alex@kocharin.ru
MIT
FAQs
React renderer for Markdown-it
We found that markdown-it-react-renderer 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.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.