Disable HTML Entity to Unicode autoconversion in markdown-it
npm install 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.
``bash`
npm i markdown-it-html-entities
`js
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); //
curly { & } brackets