This commit is contained in:
Estevao Soares dos Santos 2017-12-23 13:29:39 +00:00
parent 173ad51b05
commit 17222b3d5a
6 changed files with 4 additions and 4 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

@ -372,7 +372,7 @@ showdown.Converter = function (converterOptions) {
// doc.innerHTML = doc.innerHTML.replace(/\[[\S\t ]]/); // doc.innerHTML = doc.innerHTML.replace(/\[[\S\t ]]/);
var nodes = doc.childNodes, var nodes = doc.childNodes,
mdDoc = ''; mdDoc = '';
for (var i = 0; i < nodes.length; i++) { for (var i = 0; i < nodes.length; i++) {
mdDoc += parseNode(nodes[i]); mdDoc += parseNode(nodes[i]);
@ -536,8 +536,6 @@ showdown.Converter = function (converterOptions) {
// reference URIs must also be escaped // reference URIs must also be escaped
txt = txt.replace(/^ {0,3}\[([\S \t]*?)]:/gm, '\\[$1]:'); txt = txt.replace(/^ {0,3}\[([\S \t]*?)]:/gm, '\\[$1]:');
return txt; return txt;
} }
@ -862,7 +860,7 @@ showdown.Converter = function (converterOptions) {
// if data-language attribute is not defined, then we look for class language-* // if data-language attribute is not defined, then we look for class language-*
if (language === '') { if (language === '') {
var classes = pres[i].firstChild.className.split(" "); var classes = pres[i].firstChild.className.split(' ');
for (var c = 0; c < classes.length; ++c) { for (var c = 0; c < classes.length; ++c) {
var matches = classes[c].match(/^language-(.+)$/); var matches = classes[c].match(/^language-(.+)$/);
if (matches !== null) { if (matches !== null) {

View File

@ -381,6 +381,8 @@ showdown.helper.padEnd = function padEnd (str, targetLength, padString) {
* @returns {string} * @returns {string}
*/ */
showdown.helper.unescapeHTMLEntities = function (txt) { showdown.helper.unescapeHTMLEntities = function (txt) {
'use strict';
return txt return txt
.replace(/&quot;/g, '"') .replace(/&quot;/g, '"')
.replace(/&lt;/g, '<') .replace(/&lt;/g, '<')