@patternfly/quickstarts 2.4.2 → 2.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16644,72 +16644,77 @@ function getDefaultOpts (simple) {
|
|
|
16644
16644
|
},
|
|
16645
16645
|
smartIndentationFix: {
|
|
16646
16646
|
defaultValue: false,
|
|
16647
|
-
|
|
16647
|
+
describe: 'Tries to smartly fix indentation in es6 strings',
|
|
16648
16648
|
type: 'boolean'
|
|
16649
16649
|
},
|
|
16650
16650
|
disableForced4SpacesIndentedSublists: {
|
|
16651
16651
|
defaultValue: false,
|
|
16652
|
-
|
|
16652
|
+
describe: 'Disables the requirement of indenting nested sublists by 4 spaces',
|
|
16653
16653
|
type: 'boolean'
|
|
16654
16654
|
},
|
|
16655
16655
|
simpleLineBreaks: {
|
|
16656
16656
|
defaultValue: false,
|
|
16657
|
-
|
|
16657
|
+
describe: 'Parses simple line breaks as <br> (GFM Style)',
|
|
16658
16658
|
type: 'boolean'
|
|
16659
16659
|
},
|
|
16660
16660
|
requireSpaceBeforeHeadingText: {
|
|
16661
16661
|
defaultValue: false,
|
|
16662
|
-
|
|
16662
|
+
describe: 'Makes adding a space between `#` and the header text mandatory (GFM Style)',
|
|
16663
16663
|
type: 'boolean'
|
|
16664
16664
|
},
|
|
16665
16665
|
ghMentions: {
|
|
16666
16666
|
defaultValue: false,
|
|
16667
|
-
|
|
16667
|
+
describe: 'Enables github @mentions',
|
|
16668
16668
|
type: 'boolean'
|
|
16669
16669
|
},
|
|
16670
16670
|
ghMentionsLink: {
|
|
16671
16671
|
defaultValue: 'https://github.com/{u}',
|
|
16672
|
-
|
|
16672
|
+
describe: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.',
|
|
16673
16673
|
type: 'string'
|
|
16674
16674
|
},
|
|
16675
16675
|
encodeEmails: {
|
|
16676
16676
|
defaultValue: true,
|
|
16677
|
-
|
|
16677
|
+
describe: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities',
|
|
16678
16678
|
type: 'boolean'
|
|
16679
16679
|
},
|
|
16680
16680
|
openLinksInNewWindow: {
|
|
16681
16681
|
defaultValue: false,
|
|
16682
|
-
|
|
16682
|
+
describe: 'Open all links in new windows',
|
|
16683
16683
|
type: 'boolean'
|
|
16684
16684
|
},
|
|
16685
16685
|
backslashEscapesHTMLTags: {
|
|
16686
16686
|
defaultValue: false,
|
|
16687
|
-
|
|
16687
|
+
describe: 'Support for HTML Tag escaping. ex: \<div>foo\</div>',
|
|
16688
16688
|
type: 'boolean'
|
|
16689
16689
|
},
|
|
16690
16690
|
emoji: {
|
|
16691
16691
|
defaultValue: false,
|
|
16692
|
-
|
|
16692
|
+
describe: 'Enable emoji support. Ex: `this is a :smile: emoji`',
|
|
16693
16693
|
type: 'boolean'
|
|
16694
16694
|
},
|
|
16695
16695
|
underline: {
|
|
16696
16696
|
defaultValue: false,
|
|
16697
|
-
|
|
16697
|
+
describe: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`',
|
|
16698
|
+
type: 'boolean'
|
|
16699
|
+
},
|
|
16700
|
+
ellipsis: {
|
|
16701
|
+
defaultValue: true,
|
|
16702
|
+
describe: 'Replaces three dots with the ellipsis unicode character',
|
|
16698
16703
|
type: 'boolean'
|
|
16699
16704
|
},
|
|
16700
16705
|
completeHTMLDocument: {
|
|
16701
16706
|
defaultValue: false,
|
|
16702
|
-
|
|
16707
|
+
describe: 'Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags',
|
|
16703
16708
|
type: 'boolean'
|
|
16704
16709
|
},
|
|
16705
16710
|
metadata: {
|
|
16706
16711
|
defaultValue: false,
|
|
16707
|
-
|
|
16712
|
+
describe: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).',
|
|
16708
16713
|
type: 'boolean'
|
|
16709
16714
|
},
|
|
16710
16715
|
splitAdjacentBlockquotes: {
|
|
16711
16716
|
defaultValue: false,
|
|
16712
|
-
|
|
16717
|
+
describe: 'Split adjacent blockquote blocks',
|
|
16713
16718
|
type: 'boolean'
|
|
16714
16719
|
}
|
|
16715
16720
|
};
|
|
@@ -16917,7 +16922,7 @@ showdown.subParser = function (name, func) {
|
|
|
16917
16922
|
* Gets or registers an extension
|
|
16918
16923
|
* @static
|
|
16919
16924
|
* @param {string} name
|
|
16920
|
-
* @param {object|function=} ext
|
|
16925
|
+
* @param {object|object[]|function=} ext
|
|
16921
16926
|
* @returns {*}
|
|
16922
16927
|
*/
|
|
16923
16928
|
showdown.extension = function (name, ext) {
|
|
@@ -17236,6 +17241,20 @@ showdown.helper.escapeCharacters = function (text, charsToEscape, afterBackslash
|
|
|
17236
17241
|
return text;
|
|
17237
17242
|
};
|
|
17238
17243
|
|
|
17244
|
+
/**
|
|
17245
|
+
* Unescape HTML entities
|
|
17246
|
+
* @param txt
|
|
17247
|
+
* @returns {string}
|
|
17248
|
+
*/
|
|
17249
|
+
showdown.helper.unescapeHTMLEntities = function (txt) {
|
|
17250
|
+
|
|
17251
|
+
return txt
|
|
17252
|
+
.replace(/"/g, '"')
|
|
17253
|
+
.replace(/</g, '<')
|
|
17254
|
+
.replace(/>/g, '>')
|
|
17255
|
+
.replace(/&/g, '&');
|
|
17256
|
+
};
|
|
17257
|
+
|
|
17239
17258
|
var rgxFindMatchPos = function (str, left, right, flags) {
|
|
17240
17259
|
var f = flags || '',
|
|
17241
17260
|
g = f.indexOf('g') > -1,
|
|
@@ -17440,11 +17459,35 @@ showdown.helper.encodeEmailAddress = function (mail) {
|
|
|
17440
17459
|
return mail;
|
|
17441
17460
|
};
|
|
17442
17461
|
|
|
17462
|
+
/**
|
|
17463
|
+
*
|
|
17464
|
+
* @param str
|
|
17465
|
+
* @param targetLength
|
|
17466
|
+
* @param padString
|
|
17467
|
+
* @returns {string}
|
|
17468
|
+
*/
|
|
17469
|
+
showdown.helper.padEnd = function padEnd (str, targetLength, padString) {
|
|
17470
|
+
/*jshint bitwise: false*/
|
|
17471
|
+
// eslint-disable-next-line space-infix-ops
|
|
17472
|
+
targetLength = targetLength>>0; //floor if number or convert non-number to 0;
|
|
17473
|
+
/*jshint bitwise: true*/
|
|
17474
|
+
padString = String(padString || ' ');
|
|
17475
|
+
if (str.length > targetLength) {
|
|
17476
|
+
return String(str);
|
|
17477
|
+
} else {
|
|
17478
|
+
targetLength = targetLength - str.length;
|
|
17479
|
+
if (targetLength > padString.length) {
|
|
17480
|
+
padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed
|
|
17481
|
+
}
|
|
17482
|
+
return String(str) + padString.slice(0,targetLength);
|
|
17483
|
+
}
|
|
17484
|
+
};
|
|
17485
|
+
|
|
17443
17486
|
/**
|
|
17444
17487
|
* POLYFILLS
|
|
17445
17488
|
*/
|
|
17446
17489
|
// use this instead of builtin is undefined for IE8 compatibility
|
|
17447
|
-
if (typeof(console) === 'undefined') {
|
|
17490
|
+
if (typeof (console) === 'undefined') {
|
|
17448
17491
|
console = {
|
|
17449
17492
|
warn: function (msg) {
|
|
17450
17493
|
alert(msg);
|
|
@@ -18645,8 +18688,8 @@ showdown.helper.emojis = {
|
|
|
18645
18688
|
'zzz':'\ud83d\udca4',
|
|
18646
18689
|
|
|
18647
18690
|
/* special emojis :P */
|
|
18648
|
-
'octocat': '<img
|
|
18649
|
-
'showdown': '<img width="20" height="20" align="absmiddle" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABe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bXBNTTpEZXJpdmVkRnJvbT4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzIwMDAwLzEwMDAwPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WVJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+NjQ8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+NjQ8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Pse7bzcAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAA1JJREFUeNrsm1+OmlAUhz+aeS9dwZggJn1AnRUMO6jpBgZXULuC2hWUWUGZBTSxKyiuoA4mfUBMnB04K5g+9DihRBHlyh/lJLwIXLgf99xzzu9etZeXFy7Z3nDh1gBoAFy4XeVtQNO0zNcapmUDfUBPnFoBfhQGq6IBaHmjwD4Ahmk5wAD4kKG5J8CNwsAFaHe6DvA9cc0wCgOv8gDka3vA9RHNPgo0D7hNnJtGYWBXxgV2dH4MfMnRRA+Y1WIO2NJ5F/ikoKm3tYsChmkNFHW+fmHQMC1dfHaXPQP3wM1yMdc2B/AOGALTWobBmI1Shu0UGCwX83XyRBQGawHntTtdG5gUNfxVu4CTNqNv6/wWGL7kCc+1AmCYVisl3I2ydD4GYZUCs7IjoLXrxHIx9w9tLAqDCfBwDrXAY457x+cAoCfuwRGjYFUnAGk+PsjR7s8Dn1VeLWCYVlpDw+VivjVHSHt+u9PVJbzGzZXQWTkAkz0V31fATUaEsjVJlQBs4FeGcteLgzgbAALBA+4y3voAeJL8nA0AHfClnM1qm1HhnYUidCSE+KzvSSJUTwAxCOMcpfETMFYpfRUKIAbCFhC3OTJJJwqDWS0BxED0JZ4Pjix1P2+E0loCSMBwyK4S/xc1ojBwag8gMU84cvTKGgmlAYhngu1O9xAXuVE5J1QCQCz3bwHuHvdQui5QKQAxEO6eEKpsFCgTRSXkvdoxSlBMCxhJJbgrrbZRtHCiShN0pRB6PeQ3ckBw2K0oKXMBVYJIP+Nvh9qulFivGoBt1lLQxowT2ykBXCfnhZIglgYACWmqXQv+baioBYCeiCQHm+QEg1O7RhF7hO4OhSAhcJKSFU7qBGADwZeqMMuXn6TUBw8qlaMrirNb4LdhWlP+SWD+cjFfxTpuS2GUpik+o3jFSEkqbJiWn0P0OMSGqlWiOu0TvD+FRHZKAE+oW+cfRmEwqlsesJJEJs8y91QqP+9UL6lqEtz2gpuNEY5sm9sIHln2DRa2aFKGJtiXkZEMiWtgVvRKUSUFkSKt2S7fAGgAXLYpmQQXf36MUChTZdUa2u8/rkvPA6Tz30r4eH3ybcBS5gJ6SaNXb+aABkA1AMxKenclBZLW/He4cYEGwEXb3wEASelexk6LIIIAAAAASUVORK5CYII=">'
|
|
18691
|
+
'octocat': '<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',
|
|
18692
|
+
'showdown': '<span style="font-family: \'Anonymous Pro\', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;">S</span>'
|
|
18650
18693
|
};
|
|
18651
18694
|
|
|
18652
18695
|
/**
|
|
@@ -18695,10 +18738,10 @@ showdown.Converter = function (converterOptions) {
|
|
|
18695
18738
|
*/
|
|
18696
18739
|
setConvFlavor = setFlavor,
|
|
18697
18740
|
|
|
18698
|
-
|
|
18699
|
-
|
|
18700
|
-
|
|
18701
|
-
|
|
18741
|
+
/**
|
|
18742
|
+
* Metadata of the document
|
|
18743
|
+
* @type {{parsed: {}, raw: string, format: string}}
|
|
18744
|
+
*/
|
|
18702
18745
|
metadata = {
|
|
18703
18746
|
parsed: {},
|
|
18704
18747
|
raw: '',
|
|
@@ -18757,7 +18800,7 @@ showdown.Converter = function (converterOptions) {
|
|
|
18757
18800
|
'Please inform the developer that the extension should be updated!');
|
|
18758
18801
|
legacyExtensionLoading(showdown.extensions[ext], ext);
|
|
18759
18802
|
return;
|
|
18760
|
-
|
|
18803
|
+
// END LEGACY SUPPORT CODE
|
|
18761
18804
|
|
|
18762
18805
|
} else if (!showdown.helper.isUndefined(extensions[ext])) {
|
|
18763
18806
|
ext = extensions[ext];
|
|
@@ -18937,8 +18980,8 @@ showdown.Converter = function (converterOptions) {
|
|
|
18937
18980
|
text = text.replace(/\r\n/g, '\n'); // DOS to Unix
|
|
18938
18981
|
text = text.replace(/\r/g, '\n'); // Mac to Unix
|
|
18939
18982
|
|
|
18940
|
-
// Stardardize line spaces
|
|
18941
|
-
text = text.replace(/\u00A0/g, '
|
|
18983
|
+
// Stardardize line spaces
|
|
18984
|
+
text = text.replace(/\u00A0/g, ' ');
|
|
18942
18985
|
|
|
18943
18986
|
if (options.smartIndentationFix) {
|
|
18944
18987
|
text = rTrimInputText(text);
|
|
@@ -18993,6 +19036,112 @@ showdown.Converter = function (converterOptions) {
|
|
|
18993
19036
|
return text;
|
|
18994
19037
|
};
|
|
18995
19038
|
|
|
19039
|
+
/**
|
|
19040
|
+
* Converts an HTML string into a markdown string
|
|
19041
|
+
* @param src
|
|
19042
|
+
* @param [HTMLParser] A WHATWG DOM and HTML parser, such as JSDOM. If none is supplied, window.document will be used.
|
|
19043
|
+
* @returns {string}
|
|
19044
|
+
*/
|
|
19045
|
+
this.makeMarkdown = this.makeMd = function (src, HTMLParser) {
|
|
19046
|
+
|
|
19047
|
+
// replace \r\n with \n
|
|
19048
|
+
src = src.replace(/\r\n/g, '\n');
|
|
19049
|
+
src = src.replace(/\r/g, '\n'); // old macs
|
|
19050
|
+
|
|
19051
|
+
// due to an edge case, we need to find this: > <
|
|
19052
|
+
// to prevent removing of non silent white spaces
|
|
19053
|
+
// ex: <em>this is</em> <strong>sparta</strong>
|
|
19054
|
+
src = src.replace(/>[ \t]+</, '>¨NBSP;<');
|
|
19055
|
+
|
|
19056
|
+
if (!HTMLParser) {
|
|
19057
|
+
if (window && window.document) {
|
|
19058
|
+
HTMLParser = window.document;
|
|
19059
|
+
} else {
|
|
19060
|
+
throw new Error('HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM');
|
|
19061
|
+
}
|
|
19062
|
+
}
|
|
19063
|
+
|
|
19064
|
+
var doc = HTMLParser.createElement('div');
|
|
19065
|
+
doc.innerHTML = src;
|
|
19066
|
+
|
|
19067
|
+
var globals = {
|
|
19068
|
+
preList: substitutePreCodeTags(doc)
|
|
19069
|
+
};
|
|
19070
|
+
|
|
19071
|
+
// remove all newlines and collapse spaces
|
|
19072
|
+
clean(doc);
|
|
19073
|
+
|
|
19074
|
+
// some stuff, like accidental reference links must now be escaped
|
|
19075
|
+
// TODO
|
|
19076
|
+
// doc.innerHTML = doc.innerHTML.replace(/\[[\S\t ]]/);
|
|
19077
|
+
|
|
19078
|
+
var nodes = doc.childNodes,
|
|
19079
|
+
mdDoc = '';
|
|
19080
|
+
|
|
19081
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
19082
|
+
mdDoc += showdown.subParser('makeMarkdown.node')(nodes[i], globals);
|
|
19083
|
+
}
|
|
19084
|
+
|
|
19085
|
+
function clean (node) {
|
|
19086
|
+
for (var n = 0; n < node.childNodes.length; ++n) {
|
|
19087
|
+
var child = node.childNodes[n];
|
|
19088
|
+
if (child.nodeType === 3) {
|
|
19089
|
+
if (!/\S/.test(child.nodeValue) && !/^[ ]+$/.test(child.nodeValue)) {
|
|
19090
|
+
node.removeChild(child);
|
|
19091
|
+
--n;
|
|
19092
|
+
} else {
|
|
19093
|
+
child.nodeValue = child.nodeValue.split('\n').join(' ');
|
|
19094
|
+
child.nodeValue = child.nodeValue.replace(/(\s)+/g, '$1');
|
|
19095
|
+
}
|
|
19096
|
+
} else if (child.nodeType === 1) {
|
|
19097
|
+
clean(child);
|
|
19098
|
+
}
|
|
19099
|
+
}
|
|
19100
|
+
}
|
|
19101
|
+
|
|
19102
|
+
// find all pre tags and replace contents with placeholder
|
|
19103
|
+
// we need this so that we can remove all indentation from html
|
|
19104
|
+
// to ease up parsing
|
|
19105
|
+
function substitutePreCodeTags (doc) {
|
|
19106
|
+
|
|
19107
|
+
var pres = doc.querySelectorAll('pre'),
|
|
19108
|
+
presPH = [];
|
|
19109
|
+
|
|
19110
|
+
for (var i = 0; i < pres.length; ++i) {
|
|
19111
|
+
|
|
19112
|
+
if (pres[i].childElementCount === 1 && pres[i].firstChild.tagName.toLowerCase() === 'code') {
|
|
19113
|
+
var content = pres[i].firstChild.innerHTML.trim(),
|
|
19114
|
+
language = pres[i].firstChild.getAttribute('data-language') || '';
|
|
19115
|
+
|
|
19116
|
+
// if data-language attribute is not defined, then we look for class language-*
|
|
19117
|
+
if (language === '') {
|
|
19118
|
+
var classes = pres[i].firstChild.className.split(' ');
|
|
19119
|
+
for (var c = 0; c < classes.length; ++c) {
|
|
19120
|
+
var matches = classes[c].match(/^language-(.+)$/);
|
|
19121
|
+
if (matches !== null) {
|
|
19122
|
+
language = matches[1];
|
|
19123
|
+
break;
|
|
19124
|
+
}
|
|
19125
|
+
}
|
|
19126
|
+
}
|
|
19127
|
+
|
|
19128
|
+
// unescape html entities in content
|
|
19129
|
+
content = showdown.helper.unescapeHTMLEntities(content);
|
|
19130
|
+
|
|
19131
|
+
presPH.push(content);
|
|
19132
|
+
pres[i].outerHTML = '<precode language="' + language + '" precodenum="' + i.toString() + '"></precode>';
|
|
19133
|
+
} else {
|
|
19134
|
+
presPH.push(pres[i].innerHTML);
|
|
19135
|
+
pres[i].innerHTML = '';
|
|
19136
|
+
pres[i].setAttribute('prenum', i.toString());
|
|
19137
|
+
}
|
|
19138
|
+
}
|
|
19139
|
+
return presPH;
|
|
19140
|
+
}
|
|
19141
|
+
|
|
19142
|
+
return mdDoc;
|
|
19143
|
+
};
|
|
19144
|
+
|
|
18996
19145
|
/**
|
|
18997
19146
|
* Set an option of this Converter instance
|
|
18998
19147
|
* @param {string} key
|
|
@@ -19076,12 +19225,12 @@ showdown.Converter = function (converterOptions) {
|
|
|
19076
19225
|
var ext = extension[a];
|
|
19077
19226
|
for (var i = 0; i < langExtensions.length; ++i) {
|
|
19078
19227
|
if (langExtensions[i] === ext) {
|
|
19079
|
-
langExtensions
|
|
19228
|
+
langExtensions.splice(i, 1);
|
|
19080
19229
|
}
|
|
19081
19230
|
}
|
|
19082
|
-
for (var ii = 0; ii < outputModifiers.length; ++
|
|
19231
|
+
for (var ii = 0; ii < outputModifiers.length; ++ii) {
|
|
19083
19232
|
if (outputModifiers[ii] === ext) {
|
|
19084
|
-
outputModifiers
|
|
19233
|
+
outputModifiers.splice(ii, 1);
|
|
19085
19234
|
}
|
|
19086
19235
|
}
|
|
19087
19236
|
}
|
|
@@ -19194,7 +19343,7 @@ showdown.subParser('anchors', function (text, options, globals) {
|
|
|
19194
19343
|
// to external links. Hash links (#) open in same page
|
|
19195
19344
|
if (options.openLinksInNewWindow && !/^#/.test(url)) {
|
|
19196
19345
|
// escaped _
|
|
19197
|
-
result += ' target="¨E95Eblank"';
|
|
19346
|
+
result += ' rel="noopener noreferrer" target="¨E95Eblank"';
|
|
19198
19347
|
}
|
|
19199
19348
|
|
|
19200
19349
|
result += '>' + linkText + '</a>';
|
|
@@ -19212,7 +19361,7 @@ showdown.subParser('anchors', function (text, options, globals) {
|
|
|
19212
19361
|
|
|
19213
19362
|
// normal cases
|
|
19214
19363
|
text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,
|
|
19215
|
-
|
|
19364
|
+
writeAnchorTag);
|
|
19216
19365
|
|
|
19217
19366
|
// handle reference-style shortcuts: [link text]
|
|
19218
19367
|
// These must come last in case you've also got [link test][1]
|
|
@@ -19221,7 +19370,7 @@ showdown.subParser('anchors', function (text, options, globals) {
|
|
|
19221
19370
|
|
|
19222
19371
|
// Lastly handle GithubMentions if option is enabled
|
|
19223
19372
|
if (options.ghMentions) {
|
|
19224
|
-
text = text.replace(/(^|\s)(\\)?(@([a-z\d
|
|
19373
|
+
text = text.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi, function (wm, st, escape, mentions, username) {
|
|
19225
19374
|
if (escape === '\\') {
|
|
19226
19375
|
return st + mentions;
|
|
19227
19376
|
}
|
|
@@ -19233,7 +19382,7 @@ showdown.subParser('anchors', function (text, options, globals) {
|
|
|
19233
19382
|
var lnk = options.ghMentionsLink.replace(/\{u}/g, username),
|
|
19234
19383
|
target = '';
|
|
19235
19384
|
if (options.openLinksInNewWindow) {
|
|
19236
|
-
target = ' target="¨E95Eblank"';
|
|
19385
|
+
target = ' rel="noopener noreferrer" target="¨E95Eblank"';
|
|
19237
19386
|
}
|
|
19238
19387
|
return st + '<a href="' + lnk + '"' + target + '>' + mentions + '</a>';
|
|
19239
19388
|
});
|
|
@@ -19266,7 +19415,7 @@ var simpleURLRegex = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'
|
|
|
19266
19415
|
append = trailingPunctuation;
|
|
19267
19416
|
}
|
|
19268
19417
|
if (options.openLinksInNewWindow) {
|
|
19269
|
-
target = ' target="¨E95Eblank"';
|
|
19418
|
+
target = ' rel="noopener noreferrer" target="¨E95Eblank"';
|
|
19270
19419
|
}
|
|
19271
19420
|
return lmc + '<a href="' + link + '"' + target + '>' + lnkTxt + '</a>' + append + tmc;
|
|
19272
19421
|
};
|
|
@@ -19460,7 +19609,7 @@ showdown.subParser('codeSpans', function (text, options, globals) {
|
|
|
19460
19609
|
|
|
19461
19610
|
text = globals.converter._dispatch('codeSpans.before', text, options, globals);
|
|
19462
19611
|
|
|
19463
|
-
if (typeof(text) === 'undefined') {
|
|
19612
|
+
if (typeof (text) === 'undefined') {
|
|
19464
19613
|
text = '';
|
|
19465
19614
|
}
|
|
19466
19615
|
text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
|
|
@@ -19480,7 +19629,7 @@ showdown.subParser('codeSpans', function (text, options, globals) {
|
|
|
19480
19629
|
});
|
|
19481
19630
|
|
|
19482
19631
|
/**
|
|
19483
|
-
*
|
|
19632
|
+
* Create a full HTML document from the processed markdown
|
|
19484
19633
|
*/
|
|
19485
19634
|
showdown.subParser('completeHTMLDocument', function (text, options, globals) {
|
|
19486
19635
|
|
|
@@ -19576,6 +19725,10 @@ showdown.subParser('detab', function (text, options, globals) {
|
|
|
19576
19725
|
|
|
19577
19726
|
showdown.subParser('ellipsis', function (text, options, globals) {
|
|
19578
19727
|
|
|
19728
|
+
if (!options.ellipsis) {
|
|
19729
|
+
return text;
|
|
19730
|
+
}
|
|
19731
|
+
|
|
19579
19732
|
text = globals.converter._dispatch('ellipsis.before', text, options, globals);
|
|
19580
19733
|
|
|
19581
19734
|
text = text.replace(/\.\.\./g, '…');
|
|
@@ -19586,8 +19739,9 @@ showdown.subParser('ellipsis', function (text, options, globals) {
|
|
|
19586
19739
|
});
|
|
19587
19740
|
|
|
19588
19741
|
/**
|
|
19589
|
-
*
|
|
19590
|
-
*
|
|
19742
|
+
* Turn emoji codes into emojis
|
|
19743
|
+
*
|
|
19744
|
+
* List of supported emojis: https://github.com/showdownjs/showdown/wiki/Emojis
|
|
19591
19745
|
*/
|
|
19592
19746
|
showdown.subParser('emoji', function (text, options, globals) {
|
|
19593
19747
|
|
|
@@ -19649,7 +19803,7 @@ showdown.subParser('encodeBackslashEscapes', function (text, options, globals) {
|
|
|
19649
19803
|
text = globals.converter._dispatch('encodeBackslashEscapes.before', text, options, globals);
|
|
19650
19804
|
|
|
19651
19805
|
text = text.replace(/\\(\\)/g, showdown.helper.escapeCharactersCallback);
|
|
19652
|
-
text = text.replace(/\\([`*_{}\[\]()
|
|
19806
|
+
text = text.replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g, showdown.helper.escapeCharactersCallback);
|
|
19653
19807
|
|
|
19654
19808
|
text = globals.converter._dispatch('encodeBackslashEscapes.after', text, options, globals);
|
|
19655
19809
|
return text;
|
|
@@ -19725,7 +19879,7 @@ showdown.subParser('githubCodeBlocks', function (text, options, globals) {
|
|
|
19725
19879
|
|
|
19726
19880
|
text += '¨0';
|
|
19727
19881
|
|
|
19728
|
-
text = text.replace(/(?:^|\n)(```+|~~~+)([^\s`~]*)\n([\s\S]*?)\n\1/g, function (wholeMatch, delim, language, codeblock) {
|
|
19882
|
+
text = text.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g, function (wholeMatch, delim, language, codeblock) {
|
|
19729
19883
|
var end = (options.omitExtraWLInCodeBlocks) ? '' : '\n';
|
|
19730
19884
|
|
|
19731
19885
|
// First parse the github code block
|
|
@@ -19866,7 +20020,7 @@ showdown.subParser('hashHTMLBlocks', function (text, options, globals) {
|
|
|
19866
20020
|
|
|
19867
20021
|
//2. Split the text in that position
|
|
19868
20022
|
var subTexts = showdown.helper.splitAtIndex(text, opTagPos),
|
|
19869
|
-
|
|
20023
|
+
//3. Match recursively
|
|
19870
20024
|
newSubText1 = showdown.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, 'im');
|
|
19871
20025
|
|
|
19872
20026
|
// prevent an infinite loop
|
|
@@ -19981,13 +20135,13 @@ showdown.subParser('headers', function (text, options, globals) {
|
|
|
19981
20135
|
|
|
19982
20136
|
var headerLevelStart = (isNaN(parseInt(options.headerLevelStart))) ? 1 : parseInt(options.headerLevelStart),
|
|
19983
20137
|
|
|
19984
|
-
|
|
19985
|
-
|
|
19986
|
-
|
|
19987
|
-
|
|
19988
|
-
|
|
19989
|
-
|
|
19990
|
-
|
|
20138
|
+
// Set text-style headers:
|
|
20139
|
+
// Header 1
|
|
20140
|
+
// ========
|
|
20141
|
+
//
|
|
20142
|
+
// Header 2
|
|
20143
|
+
// --------
|
|
20144
|
+
//
|
|
19991
20145
|
setextRegexH1 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm,
|
|
19992
20146
|
setextRegexH2 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm;
|
|
19993
20147
|
|
|
@@ -20178,7 +20332,7 @@ showdown.subParser('images', function (text, options, globals) {
|
|
|
20178
20332
|
url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
|
|
20179
20333
|
var result = '<img src="' + url + '" alt="' + altText + '"';
|
|
20180
20334
|
|
|
20181
|
-
if (title) {
|
|
20335
|
+
if (title && showdown.helper.isString(title)) {
|
|
20182
20336
|
title = title
|
|
20183
20337
|
.replace(/"/g, '"')
|
|
20184
20338
|
//title = showdown.helper.escapeCharacters(title, '*_', false);
|
|
@@ -20239,10 +20393,10 @@ showdown.subParser('italicsAndBold', function (text, options, globals) {
|
|
|
20239
20393
|
|
|
20240
20394
|
// Parse underscores
|
|
20241
20395
|
if (options.literalMidWordUnderscores) {
|
|
20242
|
-
text = text.replace(/\b___(\S[\s\S]
|
|
20396
|
+
text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) {
|
|
20243
20397
|
return parseInside (txt, '<strong><em>', '</em></strong>');
|
|
20244
20398
|
});
|
|
20245
|
-
text = text.replace(/\b__(\S[\s\S]
|
|
20399
|
+
text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) {
|
|
20246
20400
|
return parseInside (txt, '<strong>', '</strong>');
|
|
20247
20401
|
});
|
|
20248
20402
|
text = text.replace(/\b_(\S[\s\S]*?)_\b/g, function (wm, txt) {
|
|
@@ -20263,13 +20417,13 @@ showdown.subParser('italicsAndBold', function (text, options, globals) {
|
|
|
20263
20417
|
|
|
20264
20418
|
// Now parse asterisks
|
|
20265
20419
|
if (options.literalMidWordAsterisks) {
|
|
20266
|
-
text = text.replace(/([^*]|^)\B\*\*\*(\S[\s\S]
|
|
20420
|
+
text = text.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g, function (wm, lead, txt) {
|
|
20267
20421
|
return parseInside (txt, lead + '<strong><em>', '</em></strong>');
|
|
20268
20422
|
});
|
|
20269
|
-
text = text.replace(/([^*]|^)\B\*\*(\S[\s\S]
|
|
20423
|
+
text = text.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g, function (wm, lead, txt) {
|
|
20270
20424
|
return parseInside (txt, lead + '<strong>', '</strong>');
|
|
20271
20425
|
});
|
|
20272
|
-
text = text.replace(/([^*]|^)\B\*(\S[\s\S]
|
|
20426
|
+
text = text.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g, function (wm, lead, txt) {
|
|
20273
20427
|
return parseInside (txt, lead + '<em>', '</em>');
|
|
20274
20428
|
});
|
|
20275
20429
|
} else {
|
|
@@ -20723,14 +20877,19 @@ showdown.subParser('strikethrough', function (text, options, globals) {
|
|
|
20723
20877
|
*/
|
|
20724
20878
|
showdown.subParser('stripLinkDefinitions', function (text, options, globals) {
|
|
20725
20879
|
|
|
20726
|
-
var regex = /^ {0,3}\[(
|
|
20727
|
-
base64Regex = /^ {0,3}\[(
|
|
20880
|
+
var regex = /^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,
|
|
20881
|
+
base64Regex = /^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;
|
|
20728
20882
|
|
|
20729
20883
|
// attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
|
|
20730
20884
|
text += '¨0';
|
|
20731
20885
|
|
|
20732
20886
|
var replaceFunc = function (wholeMatch, linkId, url, width, height, blankLines, title) {
|
|
20887
|
+
|
|
20888
|
+
// if there aren't two instances of linkId it must not be a reference link so back out
|
|
20733
20889
|
linkId = linkId.toLowerCase();
|
|
20890
|
+
if (text.toLowerCase().split(linkId).length - 1 < 2) {
|
|
20891
|
+
return wholeMatch;
|
|
20892
|
+
}
|
|
20734
20893
|
if (url.match(/^data:.+?\/.+?;base64,/)) {
|
|
20735
20894
|
// remove newlines
|
|
20736
20895
|
globals.gUrls[linkId] = url.replace(/\s/g, '');
|
|
@@ -20776,7 +20935,7 @@ showdown.subParser('tables', function (text, options, globals) {
|
|
|
20776
20935
|
}
|
|
20777
20936
|
|
|
20778
20937
|
var tableRgx = /^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,
|
|
20779
|
-
|
|
20938
|
+
//singeColTblRgx = /^ {0,3}\|.+\|\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n(?: {0,3}\|.+\|\n)+(?:\n\n|¨0)/gm;
|
|
20780
20939
|
singeColTblRgx = /^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;
|
|
20781
20940
|
|
|
20782
20941
|
function parseStyles (sLine) {
|
|
@@ -20918,11 +21077,17 @@ showdown.subParser('underline', function (text, options, globals) {
|
|
|
20918
21077
|
text = globals.converter._dispatch('underline.before', text, options, globals);
|
|
20919
21078
|
|
|
20920
21079
|
if (options.literalMidWordUnderscores) {
|
|
20921
|
-
text = text.replace(/\
|
|
21080
|
+
text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) {
|
|
21081
|
+
return '<u>' + txt + '</u>';
|
|
21082
|
+
});
|
|
21083
|
+
text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) {
|
|
20922
21084
|
return '<u>' + txt + '</u>';
|
|
20923
21085
|
});
|
|
20924
21086
|
} else {
|
|
20925
|
-
text = text.replace(/
|
|
21087
|
+
text = text.replace(/___(\S[\s\S]*?)___/g, function (wm, m) {
|
|
21088
|
+
return (/\S$/.test(m)) ? '<u>' + m + '</u>' : wm;
|
|
21089
|
+
});
|
|
21090
|
+
text = text.replace(/__(\S[\s\S]*?)__/g, function (wm, m) {
|
|
20926
21091
|
return (/\S$/.test(m)) ? '<u>' + m + '</u>' : wm;
|
|
20927
21092
|
});
|
|
20928
21093
|
}
|
|
@@ -20950,6 +21115,474 @@ showdown.subParser('unescapeSpecialChars', function (text, options, globals) {
|
|
|
20950
21115
|
return text;
|
|
20951
21116
|
});
|
|
20952
21117
|
|
|
21118
|
+
showdown.subParser('makeMarkdown.blockquote', function (node, globals) {
|
|
21119
|
+
|
|
21120
|
+
var txt = '';
|
|
21121
|
+
if (node.hasChildNodes()) {
|
|
21122
|
+
var children = node.childNodes,
|
|
21123
|
+
childrenLength = children.length;
|
|
21124
|
+
|
|
21125
|
+
for (var i = 0; i < childrenLength; ++i) {
|
|
21126
|
+
var innerTxt = showdown.subParser('makeMarkdown.node')(children[i], globals);
|
|
21127
|
+
|
|
21128
|
+
if (innerTxt === '') {
|
|
21129
|
+
continue;
|
|
21130
|
+
}
|
|
21131
|
+
txt += innerTxt;
|
|
21132
|
+
}
|
|
21133
|
+
}
|
|
21134
|
+
// cleanup
|
|
21135
|
+
txt = txt.trim();
|
|
21136
|
+
txt = '> ' + txt.split('\n').join('\n> ');
|
|
21137
|
+
return txt;
|
|
21138
|
+
});
|
|
21139
|
+
|
|
21140
|
+
showdown.subParser('makeMarkdown.codeBlock', function (node, globals) {
|
|
21141
|
+
|
|
21142
|
+
var lang = node.getAttribute('language'),
|
|
21143
|
+
num = node.getAttribute('precodenum');
|
|
21144
|
+
return '```' + lang + '\n' + globals.preList[num] + '\n```';
|
|
21145
|
+
});
|
|
21146
|
+
|
|
21147
|
+
showdown.subParser('makeMarkdown.codeSpan', function (node) {
|
|
21148
|
+
|
|
21149
|
+
return '`' + node.innerHTML + '`';
|
|
21150
|
+
});
|
|
21151
|
+
|
|
21152
|
+
showdown.subParser('makeMarkdown.emphasis', function (node, globals) {
|
|
21153
|
+
|
|
21154
|
+
var txt = '';
|
|
21155
|
+
if (node.hasChildNodes()) {
|
|
21156
|
+
txt += '*';
|
|
21157
|
+
var children = node.childNodes,
|
|
21158
|
+
childrenLength = children.length;
|
|
21159
|
+
for (var i = 0; i < childrenLength; ++i) {
|
|
21160
|
+
txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
|
|
21161
|
+
}
|
|
21162
|
+
txt += '*';
|
|
21163
|
+
}
|
|
21164
|
+
return txt;
|
|
21165
|
+
});
|
|
21166
|
+
|
|
21167
|
+
showdown.subParser('makeMarkdown.header', function (node, globals, headerLevel) {
|
|
21168
|
+
|
|
21169
|
+
var headerMark = new Array(headerLevel + 1).join('#'),
|
|
21170
|
+
txt = '';
|
|
21171
|
+
|
|
21172
|
+
if (node.hasChildNodes()) {
|
|
21173
|
+
txt = headerMark + ' ';
|
|
21174
|
+
var children = node.childNodes,
|
|
21175
|
+
childrenLength = children.length;
|
|
21176
|
+
|
|
21177
|
+
for (var i = 0; i < childrenLength; ++i) {
|
|
21178
|
+
txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
|
|
21179
|
+
}
|
|
21180
|
+
}
|
|
21181
|
+
return txt;
|
|
21182
|
+
});
|
|
21183
|
+
|
|
21184
|
+
showdown.subParser('makeMarkdown.hr', function () {
|
|
21185
|
+
|
|
21186
|
+
return '---';
|
|
21187
|
+
});
|
|
21188
|
+
|
|
21189
|
+
showdown.subParser('makeMarkdown.image', function (node) {
|
|
21190
|
+
|
|
21191
|
+
var txt = '';
|
|
21192
|
+
if (node.hasAttribute('src')) {
|
|
21193
|
+
txt += ' + '>';
|
|
21195
|
+
if (node.hasAttribute('width') && node.hasAttribute('height')) {
|
|
21196
|
+
txt += ' =' + node.getAttribute('width') + 'x' + node.getAttribute('height');
|
|
21197
|
+
}
|
|
21198
|
+
|
|
21199
|
+
if (node.hasAttribute('title')) {
|
|
21200
|
+
txt += ' "' + node.getAttribute('title') + '"';
|
|
21201
|
+
}
|
|
21202
|
+
txt += ')';
|
|
21203
|
+
}
|
|
21204
|
+
return txt;
|
|
21205
|
+
});
|
|
21206
|
+
|
|
21207
|
+
showdown.subParser('makeMarkdown.links', function (node, globals) {
|
|
21208
|
+
|
|
21209
|
+
var txt = '';
|
|
21210
|
+
if (node.hasChildNodes() && node.hasAttribute('href')) {
|
|
21211
|
+
var children = node.childNodes,
|
|
21212
|
+
childrenLength = children.length;
|
|
21213
|
+
txt = '[';
|
|
21214
|
+
for (var i = 0; i < childrenLength; ++i) {
|
|
21215
|
+
txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
|
|
21216
|
+
}
|
|
21217
|
+
txt += '](';
|
|
21218
|
+
txt += '<' + node.getAttribute('href') + '>';
|
|
21219
|
+
if (node.hasAttribute('title')) {
|
|
21220
|
+
txt += ' "' + node.getAttribute('title') + '"';
|
|
21221
|
+
}
|
|
21222
|
+
txt += ')';
|
|
21223
|
+
}
|
|
21224
|
+
return txt;
|
|
21225
|
+
});
|
|
21226
|
+
|
|
21227
|
+
showdown.subParser('makeMarkdown.list', function (node, globals, type) {
|
|
21228
|
+
|
|
21229
|
+
var txt = '';
|
|
21230
|
+
if (!node.hasChildNodes()) {
|
|
21231
|
+
return '';
|
|
21232
|
+
}
|
|
21233
|
+
var listItems = node.childNodes,
|
|
21234
|
+
listItemsLenght = listItems.length,
|
|
21235
|
+
listNum = node.getAttribute('start') || 1;
|
|
21236
|
+
|
|
21237
|
+
for (var i = 0; i < listItemsLenght; ++i) {
|
|
21238
|
+
if (typeof listItems[i].tagName === 'undefined' || listItems[i].tagName.toLowerCase() !== 'li') {
|
|
21239
|
+
continue;
|
|
21240
|
+
}
|
|
21241
|
+
|
|
21242
|
+
// define the bullet to use in list
|
|
21243
|
+
var bullet = '';
|
|
21244
|
+
if (type === 'ol') {
|
|
21245
|
+
bullet = listNum.toString() + '. ';
|
|
21246
|
+
} else {
|
|
21247
|
+
bullet = '- ';
|
|
21248
|
+
}
|
|
21249
|
+
|
|
21250
|
+
// parse list item
|
|
21251
|
+
txt += bullet + showdown.subParser('makeMarkdown.listItem')(listItems[i], globals);
|
|
21252
|
+
++listNum;
|
|
21253
|
+
}
|
|
21254
|
+
|
|
21255
|
+
// add comment at the end to prevent consecutive lists to be parsed as one
|
|
21256
|
+
txt += '\n<!-- -->\n';
|
|
21257
|
+
return txt.trim();
|
|
21258
|
+
});
|
|
21259
|
+
|
|
21260
|
+
showdown.subParser('makeMarkdown.listItem', function (node, globals) {
|
|
21261
|
+
|
|
21262
|
+
var listItemTxt = '';
|
|
21263
|
+
|
|
21264
|
+
var children = node.childNodes,
|
|
21265
|
+
childrenLenght = children.length;
|
|
21266
|
+
|
|
21267
|
+
for (var i = 0; i < childrenLenght; ++i) {
|
|
21268
|
+
listItemTxt += showdown.subParser('makeMarkdown.node')(children[i], globals);
|
|
21269
|
+
}
|
|
21270
|
+
// if it's only one liner, we need to add a newline at the end
|
|
21271
|
+
if (!/\n$/.test(listItemTxt)) {
|
|
21272
|
+
listItemTxt += '\n';
|
|
21273
|
+
} else {
|
|
21274
|
+
// it's multiparagraph, so we need to indent
|
|
21275
|
+
listItemTxt = listItemTxt
|
|
21276
|
+
.split('\n')
|
|
21277
|
+
.join('\n ')
|
|
21278
|
+
.replace(/^ {4}$/gm, '')
|
|
21279
|
+
.replace(/\n\n+/g, '\n\n');
|
|
21280
|
+
}
|
|
21281
|
+
|
|
21282
|
+
return listItemTxt;
|
|
21283
|
+
});
|
|
21284
|
+
|
|
21285
|
+
|
|
21286
|
+
|
|
21287
|
+
showdown.subParser('makeMarkdown.node', function (node, globals, spansOnly) {
|
|
21288
|
+
|
|
21289
|
+
spansOnly = spansOnly || false;
|
|
21290
|
+
|
|
21291
|
+
var txt = '';
|
|
21292
|
+
|
|
21293
|
+
// edge case of text without wrapper paragraph
|
|
21294
|
+
if (node.nodeType === 3) {
|
|
21295
|
+
return showdown.subParser('makeMarkdown.txt')(node, globals);
|
|
21296
|
+
}
|
|
21297
|
+
|
|
21298
|
+
// HTML comment
|
|
21299
|
+
if (node.nodeType === 8) {
|
|
21300
|
+
return '<!--' + node.data + '-->\n\n';
|
|
21301
|
+
}
|
|
21302
|
+
|
|
21303
|
+
// process only node elements
|
|
21304
|
+
if (node.nodeType !== 1) {
|
|
21305
|
+
return '';
|
|
21306
|
+
}
|
|
21307
|
+
|
|
21308
|
+
var tagName = node.tagName.toLowerCase();
|
|
21309
|
+
|
|
21310
|
+
switch (tagName) {
|
|
21311
|
+
|
|
21312
|
+
//
|
|
21313
|
+
// BLOCKS
|
|
21314
|
+
//
|
|
21315
|
+
case 'h1':
|
|
21316
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 1) + '\n\n'; }
|
|
21317
|
+
break;
|
|
21318
|
+
case 'h2':
|
|
21319
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 2) + '\n\n'; }
|
|
21320
|
+
break;
|
|
21321
|
+
case 'h3':
|
|
21322
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 3) + '\n\n'; }
|
|
21323
|
+
break;
|
|
21324
|
+
case 'h4':
|
|
21325
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 4) + '\n\n'; }
|
|
21326
|
+
break;
|
|
21327
|
+
case 'h5':
|
|
21328
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 5) + '\n\n'; }
|
|
21329
|
+
break;
|
|
21330
|
+
case 'h6':
|
|
21331
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 6) + '\n\n'; }
|
|
21332
|
+
break;
|
|
21333
|
+
|
|
21334
|
+
case 'p':
|
|
21335
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.paragraph')(node, globals) + '\n\n'; }
|
|
21336
|
+
break;
|
|
21337
|
+
|
|
21338
|
+
case 'blockquote':
|
|
21339
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.blockquote')(node, globals) + '\n\n'; }
|
|
21340
|
+
break;
|
|
21341
|
+
|
|
21342
|
+
case 'hr':
|
|
21343
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.hr')(node, globals) + '\n\n'; }
|
|
21344
|
+
break;
|
|
21345
|
+
|
|
21346
|
+
case 'ol':
|
|
21347
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ol') + '\n\n'; }
|
|
21348
|
+
break;
|
|
21349
|
+
|
|
21350
|
+
case 'ul':
|
|
21351
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ul') + '\n\n'; }
|
|
21352
|
+
break;
|
|
21353
|
+
|
|
21354
|
+
case 'precode':
|
|
21355
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.codeBlock')(node, globals) + '\n\n'; }
|
|
21356
|
+
break;
|
|
21357
|
+
|
|
21358
|
+
case 'pre':
|
|
21359
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.pre')(node, globals) + '\n\n'; }
|
|
21360
|
+
break;
|
|
21361
|
+
|
|
21362
|
+
case 'table':
|
|
21363
|
+
if (!spansOnly) { txt = showdown.subParser('makeMarkdown.table')(node, globals) + '\n\n'; }
|
|
21364
|
+
break;
|
|
21365
|
+
|
|
21366
|
+
//
|
|
21367
|
+
// SPANS
|
|
21368
|
+
//
|
|
21369
|
+
case 'code':
|
|
21370
|
+
txt = showdown.subParser('makeMarkdown.codeSpan')(node, globals);
|
|
21371
|
+
break;
|
|
21372
|
+
|
|
21373
|
+
case 'em':
|
|
21374
|
+
case 'i':
|
|
21375
|
+
txt = showdown.subParser('makeMarkdown.emphasis')(node, globals);
|
|
21376
|
+
break;
|
|
21377
|
+
|
|
21378
|
+
case 'strong':
|
|
21379
|
+
case 'b':
|
|
21380
|
+
txt = showdown.subParser('makeMarkdown.strong')(node, globals);
|
|
21381
|
+
break;
|
|
21382
|
+
|
|
21383
|
+
case 'del':
|
|
21384
|
+
txt = showdown.subParser('makeMarkdown.strikethrough')(node, globals);
|
|
21385
|
+
break;
|
|
21386
|
+
|
|
21387
|
+
case 'a':
|
|
21388
|
+
txt = showdown.subParser('makeMarkdown.links')(node, globals);
|
|
21389
|
+
break;
|
|
21390
|
+
|
|
21391
|
+
case 'img':
|
|
21392
|
+
txt = showdown.subParser('makeMarkdown.image')(node, globals);
|
|
21393
|
+
break;
|
|
21394
|
+
|
|
21395
|
+
default:
|
|
21396
|
+
txt = node.outerHTML + '\n\n';
|
|
21397
|
+
}
|
|
21398
|
+
|
|
21399
|
+
// common normalization
|
|
21400
|
+
// TODO eventually
|
|
21401
|
+
|
|
21402
|
+
return txt;
|
|
21403
|
+
});
|
|
21404
|
+
|
|
21405
|
+
showdown.subParser('makeMarkdown.paragraph', function (node, globals) {
|
|
21406
|
+
|
|
21407
|
+
var txt = '';
|
|
21408
|
+
if (node.hasChildNodes()) {
|
|
21409
|
+
var children = node.childNodes,
|
|
21410
|
+
childrenLength = children.length;
|
|
21411
|
+
for (var i = 0; i < childrenLength; ++i) {
|
|
21412
|
+
txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
|
|
21413
|
+
}
|
|
21414
|
+
}
|
|
21415
|
+
|
|
21416
|
+
// some text normalization
|
|
21417
|
+
txt = txt.trim();
|
|
21418
|
+
|
|
21419
|
+
return txt;
|
|
21420
|
+
});
|
|
21421
|
+
|
|
21422
|
+
showdown.subParser('makeMarkdown.pre', function (node, globals) {
|
|
21423
|
+
|
|
21424
|
+
var num = node.getAttribute('prenum');
|
|
21425
|
+
return '<pre>' + globals.preList[num] + '</pre>';
|
|
21426
|
+
});
|
|
21427
|
+
|
|
21428
|
+
showdown.subParser('makeMarkdown.strikethrough', function (node, globals) {
|
|
21429
|
+
|
|
21430
|
+
var txt = '';
|
|
21431
|
+
if (node.hasChildNodes()) {
|
|
21432
|
+
txt += '~~';
|
|
21433
|
+
var children = node.childNodes,
|
|
21434
|
+
childrenLength = children.length;
|
|
21435
|
+
for (var i = 0; i < childrenLength; ++i) {
|
|
21436
|
+
txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
|
|
21437
|
+
}
|
|
21438
|
+
txt += '~~';
|
|
21439
|
+
}
|
|
21440
|
+
return txt;
|
|
21441
|
+
});
|
|
21442
|
+
|
|
21443
|
+
showdown.subParser('makeMarkdown.strong', function (node, globals) {
|
|
21444
|
+
|
|
21445
|
+
var txt = '';
|
|
21446
|
+
if (node.hasChildNodes()) {
|
|
21447
|
+
txt += '**';
|
|
21448
|
+
var children = node.childNodes,
|
|
21449
|
+
childrenLength = children.length;
|
|
21450
|
+
for (var i = 0; i < childrenLength; ++i) {
|
|
21451
|
+
txt += showdown.subParser('makeMarkdown.node')(children[i], globals);
|
|
21452
|
+
}
|
|
21453
|
+
txt += '**';
|
|
21454
|
+
}
|
|
21455
|
+
return txt;
|
|
21456
|
+
});
|
|
21457
|
+
|
|
21458
|
+
showdown.subParser('makeMarkdown.table', function (node, globals) {
|
|
21459
|
+
|
|
21460
|
+
var txt = '',
|
|
21461
|
+
tableArray = [[], []],
|
|
21462
|
+
headings = node.querySelectorAll('thead>tr>th'),
|
|
21463
|
+
rows = node.querySelectorAll('tbody>tr'),
|
|
21464
|
+
i, ii;
|
|
21465
|
+
for (i = 0; i < headings.length; ++i) {
|
|
21466
|
+
var headContent = showdown.subParser('makeMarkdown.tableCell')(headings[i], globals),
|
|
21467
|
+
allign = '---';
|
|
21468
|
+
|
|
21469
|
+
if (headings[i].hasAttribute('style')) {
|
|
21470
|
+
var style = headings[i].getAttribute('style').toLowerCase().replace(/\s/g, '');
|
|
21471
|
+
switch (style) {
|
|
21472
|
+
case 'text-align:left;':
|
|
21473
|
+
allign = ':---';
|
|
21474
|
+
break;
|
|
21475
|
+
case 'text-align:right;':
|
|
21476
|
+
allign = '---:';
|
|
21477
|
+
break;
|
|
21478
|
+
case 'text-align:center;':
|
|
21479
|
+
allign = ':---:';
|
|
21480
|
+
break;
|
|
21481
|
+
}
|
|
21482
|
+
}
|
|
21483
|
+
tableArray[0][i] = headContent.trim();
|
|
21484
|
+
tableArray[1][i] = allign;
|
|
21485
|
+
}
|
|
21486
|
+
|
|
21487
|
+
for (i = 0; i < rows.length; ++i) {
|
|
21488
|
+
var r = tableArray.push([]) - 1,
|
|
21489
|
+
cols = rows[i].getElementsByTagName('td');
|
|
21490
|
+
|
|
21491
|
+
for (ii = 0; ii < headings.length; ++ii) {
|
|
21492
|
+
var cellContent = ' ';
|
|
21493
|
+
if (typeof cols[ii] !== 'undefined') {
|
|
21494
|
+
cellContent = showdown.subParser('makeMarkdown.tableCell')(cols[ii], globals);
|
|
21495
|
+
}
|
|
21496
|
+
tableArray[r].push(cellContent);
|
|
21497
|
+
}
|
|
21498
|
+
}
|
|
21499
|
+
|
|
21500
|
+
var cellSpacesCount = 3;
|
|
21501
|
+
for (i = 0; i < tableArray.length; ++i) {
|
|
21502
|
+
for (ii = 0; ii < tableArray[i].length; ++ii) {
|
|
21503
|
+
var strLen = tableArray[i][ii].length;
|
|
21504
|
+
if (strLen > cellSpacesCount) {
|
|
21505
|
+
cellSpacesCount = strLen;
|
|
21506
|
+
}
|
|
21507
|
+
}
|
|
21508
|
+
}
|
|
21509
|
+
|
|
21510
|
+
for (i = 0; i < tableArray.length; ++i) {
|
|
21511
|
+
for (ii = 0; ii < tableArray[i].length; ++ii) {
|
|
21512
|
+
if (i === 1) {
|
|
21513
|
+
if (tableArray[i][ii].slice(-1) === ':') {
|
|
21514
|
+
tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii].slice(-1), cellSpacesCount - 1, '-') + ':';
|
|
21515
|
+
} else {
|
|
21516
|
+
tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount, '-');
|
|
21517
|
+
}
|
|
21518
|
+
} else {
|
|
21519
|
+
tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount);
|
|
21520
|
+
}
|
|
21521
|
+
}
|
|
21522
|
+
txt += '| ' + tableArray[i].join(' | ') + ' |\n';
|
|
21523
|
+
}
|
|
21524
|
+
|
|
21525
|
+
return txt.trim();
|
|
21526
|
+
});
|
|
21527
|
+
|
|
21528
|
+
showdown.subParser('makeMarkdown.tableCell', function (node, globals) {
|
|
21529
|
+
|
|
21530
|
+
var txt = '';
|
|
21531
|
+
if (!node.hasChildNodes()) {
|
|
21532
|
+
return '';
|
|
21533
|
+
}
|
|
21534
|
+
var children = node.childNodes,
|
|
21535
|
+
childrenLength = children.length;
|
|
21536
|
+
|
|
21537
|
+
for (var i = 0; i < childrenLength; ++i) {
|
|
21538
|
+
txt += showdown.subParser('makeMarkdown.node')(children[i], globals, true);
|
|
21539
|
+
}
|
|
21540
|
+
return txt.trim();
|
|
21541
|
+
});
|
|
21542
|
+
|
|
21543
|
+
showdown.subParser('makeMarkdown.txt', function (node) {
|
|
21544
|
+
|
|
21545
|
+
var txt = node.nodeValue;
|
|
21546
|
+
|
|
21547
|
+
// multiple spaces are collapsed
|
|
21548
|
+
txt = txt.replace(/ +/g, ' ');
|
|
21549
|
+
|
|
21550
|
+
// replace the custom ¨NBSP; with a space
|
|
21551
|
+
txt = txt.replace(/¨NBSP;/g, ' ');
|
|
21552
|
+
|
|
21553
|
+
// ", <, > and & should replace escaped html entities
|
|
21554
|
+
txt = showdown.helper.unescapeHTMLEntities(txt);
|
|
21555
|
+
|
|
21556
|
+
// escape markdown magic characters
|
|
21557
|
+
// emphasis, strong and strikethrough - can appear everywhere
|
|
21558
|
+
// we also escape pipe (|) because of tables
|
|
21559
|
+
// and escape ` because of code blocks and spans
|
|
21560
|
+
txt = txt.replace(/([*_~|`])/g, '\\$1');
|
|
21561
|
+
|
|
21562
|
+
// escape > because of blockquotes
|
|
21563
|
+
txt = txt.replace(/^(\s*)>/g, '\\$1>');
|
|
21564
|
+
|
|
21565
|
+
// hash character, only troublesome at the beginning of a line because of headers
|
|
21566
|
+
txt = txt.replace(/^#/gm, '\\#');
|
|
21567
|
+
|
|
21568
|
+
// horizontal rules
|
|
21569
|
+
txt = txt.replace(/^(\s*)([-=]{3,})(\s*)$/, '$1\\$2$3');
|
|
21570
|
+
|
|
21571
|
+
// dot, because of ordered lists, only troublesome at the beginning of a line when preceded by an integer
|
|
21572
|
+
txt = txt.replace(/^( {0,3}\d+)\./gm, '$1\\.');
|
|
21573
|
+
|
|
21574
|
+
// +, * and -, at the beginning of a line becomes a list, so we need to escape them also (asterisk was already escaped)
|
|
21575
|
+
txt = txt.replace(/^( {0,3})([+-])/gm, '$1\\$2');
|
|
21576
|
+
|
|
21577
|
+
// images and links, ] followed by ( is problematic, so we escape it
|
|
21578
|
+
txt = txt.replace(/]([\s]*)\(/g, '\\]$1\\(');
|
|
21579
|
+
|
|
21580
|
+
// reference URIs must also be escaped
|
|
21581
|
+
txt = txt.replace(/^ {0,3}\[([\S \t]*?)]:/gm, '\\[$1]:');
|
|
21582
|
+
|
|
21583
|
+
return txt;
|
|
21584
|
+
});
|
|
21585
|
+
|
|
20953
21586
|
var root = this;
|
|
20954
21587
|
|
|
20955
21588
|
// AMD Loader
|