UNPKG

showdown

Version:

A Markdown to HTML converter written in Javascript

13 lines (11 loc) 324 B
/** * Swap back in all the special characters we've hidden. */ showdown.subParser('unescapeSpecialChars', function (text) { 'use strict'; text = text.replace(/~E(\d+)E/g, function (wholeMatch, m1) { var charCodeToReplace = parseInt(m1); return String.fromCharCode(charCodeToReplace); }); return text; });