1.0.1 • Published 6 years ago

markdown-it-html-entities v1.0.1

Weekly downloads
11
License
MIT
Repository
github
Last release
6 years ago

markdown-it-html-entities

Build Status

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 &#123; &amp; &#125; brackets</p>