fix(helpers): fix wrong function call 'escapeCharacters' due to old strayed code

This commit is contained in:
Estevão Soares dos Santos 2015-01-19 15:42:20 +00:00
parent 0da9626408
commit 18ba4e756f
6 changed files with 8 additions and 6 deletions

BIN
dist/showdown.js vendored

Binary file not shown.

BIN
dist/showdown.js.map vendored

Binary file not shown.

BIN
dist/showdown.min.js vendored

Binary file not shown.

Binary file not shown.

View File

@ -55,17 +55,19 @@ showdown.helper.isUndefined = function isUndefined(value) {
return typeof value === 'undefined'; return typeof value === 'undefined';
}; };
function escapeCharactersCallback(wholeMatch, m1) {
'use strict';
var charCodeToEscape = m1.charCodeAt(0);
return '~E' + charCodeToEscape + 'E';
}
/** /**
* Callback used to escape characters when passing through String.replace * Callback used to escape characters when passing through String.replace
* @param {string} wholeMatch * @param {string} wholeMatch
* @param {string} m1 * @param {string} m1
* @returns {string} * @returns {string}
*/ */
showdown.helper.escapeCharactersCallback = function escapeCharactersCallback(wholeMatch, m1) { showdown.helper.escapeCharactersCallback = escapeCharactersCallback;
'use strict';
var charCodeToEscape = m1.charCodeAt(0);
return '~E' + charCodeToEscape + 'E';
};
/** /**
* Escape characters in a string * Escape characters in a string

View File

@ -44,7 +44,7 @@ showdown.subParser('images', function (text, options, globals) {
//if (title != "") { //if (title != "") {
title = title.replace(/"/g, '"'); title = title.replace(/"/g, '"');
title = escapeCharacters(title, '*_'); title = showdown.helper.escapeCharacters(title, '*_', false);
result += ' title="' + title + '"'; result += ' title="' + title + '"';
//} //}