/** * Hash and escape elements that should not be parsed as markdown */ showdown.subParser('hashCodeTags', function (text, options, globals) { 'use strict'; text = globals.converter._dispatch('hashCodeTags.before', text, options, globals); var repFunc = function (wholeMatch, match, left, right) { var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right; return '¨C' + (globals.gHtmlSpans.push(codeblock) - 1) + 'C'; }; // Hash naked text = showdown.helper.replaceRecursiveRegExp(text, repFunc, ']*>', '', 'gim'); text = globals.converter._dispatch('hashCodeTags.after', text, options, globals); return text; });