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';
|
||||
};
|
||||
|
||||
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
|
||||
* @param {string} wholeMatch
|
||||
* @param {string} m1
|
||||
* @returns {string}
|
||||
*/
|
||||
showdown.helper.escapeCharactersCallback = function escapeCharactersCallback(wholeMatch, m1) {
|
||||
'use strict';
|
||||
var charCodeToEscape = m1.charCodeAt(0);
|
||||
return '~E' + charCodeToEscape + 'E';
|
||||
};
|
||||
showdown.helper.escapeCharactersCallback = escapeCharactersCallback;
|
||||
|
||||
/**
|
||||
* Escape characters in a string
|
||||
|
|
|
@ -44,7 +44,7 @@ showdown.subParser('images', function (text, options, globals) {
|
|||
|
||||
//if (title != "") {
|
||||
title = title.replace(/"/g, '"');
|
||||
title = escapeCharacters(title, '*_');
|
||||
title = showdown.helper.escapeCharacters(title, '*_', false);
|
||||
result += ' title="' + title + '"';
|
||||
//}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user