mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
fix(helpers): fix wrong function call 'escapeCharacters' due to old strayed code
This commit is contained in:
parent
0da9626408
commit
18ba4e756f
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js.map
vendored
BIN
dist/showdown.min.js.map
vendored
Binary file not shown.
|
@ -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
|
||||||
|
|
|
@ -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 + '"';
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user