![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
node-markdown
Advanced tools
node-markdown is based on Showdown parser and is meant to parse Markdown syntax into HTML code.
Use npm
package manager
npm install node-markdown
Include Markdown parser
var md = require("node-markdown").Markdown;
Parse Markdown syntax into HTML
var html = md("**markdown** string");
Allow only default set of HTML tags to be used
var html = md("**markdown** string", true);
Allow only specified HTML tags to be used (default set of allowed attributes is used)
var html = md("**markdown** string", true, "p|strong|span");
Allow specified HTML tags and specified attributes
var html = md("**markdown** string", true, "p|strong|span", {
"a":"href", // 'href' for links
"*":"title|style" // 'title' and 'style' for all
});
Complete example
var md_text = "**bold** *italic* [link](http://www.neti.ee) `code block`",
md_parser = require("node-markdown").Markdown;
// simple
console.log(md_parser(md_text));
// limit HTML tags and attributes
console.log(md_parser(md_text, true, 'h1|p|span'));
// limit HTML tags and keep attributes for allowed tags
var allowedTags = 'a|img';
allowedAttributes = {
'a':'href|style',
'img': 'src',
'*': 'title'
}
console.log(md_parser(md_text, true, allowedTags, allowedAttributes));
FAQs
Parse Markdown syntax with node.js
The npm package node-markdown receives a total of 1,574 weekly downloads. As such, node-markdown popularity was classified as popular.
We found that node-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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.