2015-01-16 05:21:33 +08:00
|
|
|
/**
|
|
|
|
* Swap back in all the special characters we've hidden.
|
|
|
|
*/
|
2017-01-30 03:28:30 +08:00
|
|
|
showdown.subParser('unescapeSpecialChars', function (text, options, globals) {
|
2015-01-19 19:37:21 +08:00
|
|
|
'use strict';
|
2017-01-30 03:28:30 +08:00
|
|
|
text = globals.converter._dispatch('unescapeSpecialChars.before', text, options, globals);
|
2015-01-16 05:21:33 +08:00
|
|
|
|
2017-01-29 08:07:19 +08:00
|
|
|
text = text.replace(/¨E(\d+)E/g, function (wholeMatch, m1) {
|
2015-01-19 19:37:21 +08:00
|
|
|
var charCodeToReplace = parseInt(m1);
|
|
|
|
return String.fromCharCode(charCodeToReplace);
|
|
|
|
});
|
2017-01-30 03:28:30 +08:00
|
|
|
|
|
|
|
text = globals.converter._dispatch('unescapeSpecialChars.after', text, options, globals);
|
2015-01-19 19:37:21 +08:00
|
|
|
return text;
|
2015-01-16 05:21:33 +08:00
|
|
|
});
|