mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
13 lines
324 B
JavaScript
13 lines
324 B
JavaScript
/**
|
|
* 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;
|
|
});
|