markdown-it-html-entities
v1.0.1
Published
Disable HTML Entity to Unicode autoconversion in markdown-it
Downloads
45
Maintainers
Readme
markdown-it-html-entities
Currently markdown-it follows CommonMark specs which requires HTML Entities replacement with Unicode Characters and currently there is no native way to disable HTML Entities autoconversion.
This plugin disables the automatic HTML Entities to Unicode conversion in markdown-it and let the browser display expected character using HTML Entities accordingly, avoiding unexpected character conversion which might not play well if you would like to integrate the Markdown output with the system that expect HTML Entities and in general it's just adding support for using HTML Entities in the Markdown.
Installation
npm i markdown-it-html-entities
Usage
const markdownIt = require("markdown-it");
const htmlEntities = require("markdown-it-html-entities");
const markdown = markdownIt().use(htmlEntities);
const result = markdown.render("curly { & } brackets");
console.log(result); // <p>curly { & } brackets</p>