|
@ -1,4 +1,4 @@ |
|
|
/*! markdown-it 4.2.1 https://github.com//markdown-it/markdown-it @license MIT */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.markdownit = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ |
|
|
/*! markdown-it 4.2.2 https://github.com//markdown-it/markdown-it @license MIT */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.markdownit = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ |
|
|
// HTML5 entities map: { name -> utf16string }
|
|
|
// HTML5 entities map: { name -> utf16string }
|
|
|
//
|
|
|
//
|
|
|
'use strict'; |
|
|
'use strict'; |
|
@ -889,9 +889,10 @@ function normalizeLinkText(url) { |
|
|
* - __typographer__ - `false`. Set `true` to enable [some language-neutral |
|
|
* - __typographer__ - `false`. Set `true` to enable [some language-neutral |
|
|
* replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +
|
|
|
* replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js) +
|
|
|
* quotes beautification (smartquotes). |
|
|
* quotes beautification (smartquotes). |
|
|
* - __quotes__ - `“”‘’`, string. Double + single quotes replacement pairs, when |
|
|
* - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement |
|
|
* typographer enabled and smartquotes on. Set doubles to '«»' for Russian, |
|
|
* pairs, when typographer enabled and smartquotes on. For example, you can |
|
|
* '„“' for German. |
|
|
* use `'«»„“'` for Russian, `'„“‚‘'` for German, and |
|
|
|
|
|
* `['«\xA0', '\xA0»', '‹\xA0', '\xA0›']` for French (including nbsp). |
|
|
* - __highlight__ - `null`. Highlighter function for fenced code blocks. |
|
|
* - __highlight__ - `null`. Highlighter function for fenced code blocks. |
|
|
* Highlighter `function (str, lang)` should return escaped HTML. It can also |
|
|
* Highlighter `function (str, lang)` should return escaped HTML. It can also |
|
|
* return empty string if the source was not changed and should be escaped externaly. |
|
|
* return empty string if the source was not changed and should be escaped externaly. |
|
@ -1010,8 +1011,10 @@ function MarkdownIt(presetName, options) { |
|
|
* MarkdownIt#validateLink(url) -> Boolean |
|
|
* MarkdownIt#validateLink(url) -> Boolean |
|
|
* |
|
|
* |
|
|
* Link validation function. CommonMark allows too much in links. By default |
|
|
* Link validation function. CommonMark allows too much in links. By default |
|
|
* we disable `javascript:` and `vbscript:` schemas. You can change this |
|
|
* we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas |
|
|
* behaviour. |
|
|
* except some embedded image types. |
|
|
|
|
|
* |
|
|
|
|
|
* You can change this behaviour: |
|
|
* |
|
|
* |
|
|
* ```javascript
|
|
|
* ```javascript
|
|
|
* var md = require('markdown-it')(); |
|
|
* var md = require('markdown-it')(); |
|
@ -1622,7 +1625,10 @@ module.exports = { |
|
|
typographer: false, |
|
|
typographer: false, |
|
|
|
|
|
|
|
|
// Double + single quotes replacement pairs, when typographer enabled,
|
|
|
// Double + single quotes replacement pairs, when typographer enabled,
|
|
|
// and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.
|
|
|
// and smartquotes on. Could be either a String or an Array.
|
|
|
|
|
|
//
|
|
|
|
|
|
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
|
|
|
|
|
|
// and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
|
|
|
quotes: '\u201c\u201d\u2018\u2019' /* “”‘’ */, |
|
|
quotes: '\u201c\u201d\u2018\u2019' /* “”‘’ */, |
|
|
|
|
|
|
|
|
// Highlighter function. Should return escaped HTML,
|
|
|
// Highlighter function. Should return escaped HTML,
|
|
@ -1695,7 +1701,10 @@ module.exports = { |
|
|
typographer: false, |
|
|
typographer: false, |
|
|
|
|
|
|
|
|
// Double + single quotes replacement pairs, when typographer enabled,
|
|
|
// Double + single quotes replacement pairs, when typographer enabled,
|
|
|
// and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.
|
|
|
// and smartquotes on. Could be either a String or an Array.
|
|
|
|
|
|
//
|
|
|
|
|
|
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
|
|
|
|
|
|
// and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
|
|
|
quotes: '\u201c\u201d\u2018\u2019' /* “”‘’ */, |
|
|
quotes: '\u201c\u201d\u2018\u2019' /* “”‘’ */, |
|
|
|
|
|
|
|
|
// Highlighter function. Should return escaped HTML,
|
|
|
// Highlighter function. Should return escaped HTML,
|
|
@ -1735,7 +1744,10 @@ module.exports = { |
|
|
typographer: false, |
|
|
typographer: false, |
|
|
|
|
|
|
|
|
// Double + single quotes replacement pairs, when typographer enabled,
|
|
|
// Double + single quotes replacement pairs, when typographer enabled,
|
|
|
// and smartquotes on. Set doubles to '«»' for Russian, '„“' for German.
|
|
|
// and smartquotes on. Could be either a String or an Array.
|
|
|
|
|
|
//
|
|
|
|
|
|
// For example, you can use '«»„“' for Russian, '„“‚‘' for German,
|
|
|
|
|
|
// and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
|
|
|
quotes: '\u201c\u201d\u2018\u2019' /* “”‘’ */, |
|
|
quotes: '\u201c\u201d\u2018\u2019' /* “”‘’ */, |
|
|
|
|
|
|
|
|
// Highlighter function. Should return escaped HTML,
|
|
|
// Highlighter function. Should return escaped HTML,
|
|
@ -2485,6 +2497,8 @@ module.exports = function blockquote(state, startLine, endLine, silent) { |
|
|
// - - -
|
|
|
// - - -
|
|
|
// ```
|
|
|
// ```
|
|
|
for (nextLine = startLine + 1; nextLine < endLine; nextLine++) { |
|
|
for (nextLine = startLine + 1; nextLine < endLine; nextLine++) { |
|
|
|
|
|
if (state.tShift[nextLine] < oldIndent) { break; } |
|
|
|
|
|
|
|
|
pos = state.bMarks[nextLine] + state.tShift[nextLine]; |
|
|
pos = state.bMarks[nextLine] + state.tShift[nextLine]; |
|
|
max = state.eMarks[nextLine]; |
|
|
max = state.eMarks[nextLine]; |
|
|
|
|
|
|
|
@ -2530,7 +2544,7 @@ module.exports = function blockquote(state, startLine, endLine, silent) { |
|
|
//
|
|
|
//
|
|
|
// Any negative number will do the job here, but it's better for it
|
|
|
// Any negative number will do the job here, but it's better for it
|
|
|
// to be large enough to make any bugs obvious.
|
|
|
// to be large enough to make any bugs obvious.
|
|
|
state.tShift[nextLine] = -1337; |
|
|
state.tShift[nextLine] = -1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
oldParentType = state.parentType; |
|
|
oldParentType = state.parentType; |
|
@ -3182,6 +3196,9 @@ module.exports = function paragraph(state, startLine/*, endLine*/) { |
|
|
// it's considered a lazy continuation regardless of what's there
|
|
|
// it's considered a lazy continuation regardless of what's there
|
|
|
if (state.tShift[nextLine] - state.blkIndent > 3) { continue; } |
|
|
if (state.tShift[nextLine] - state.blkIndent > 3) { continue; } |
|
|
|
|
|
|
|
|
|
|
|
// quirk for blockquotes, this line should already be checked by that rule
|
|
|
|
|
|
if (state.tShift[nextLine] < 0) { continue; } |
|
|
|
|
|
|
|
|
// Some tags can terminate paragraph without empty line.
|
|
|
// Some tags can terminate paragraph without empty line.
|
|
|
terminate = false; |
|
|
terminate = false; |
|
|
for (i = 0, l = terminatorRules.length; i < l; i++) { |
|
|
for (i = 0, l = terminatorRules.length; i < l; i++) { |
|
@ -3263,6 +3280,9 @@ module.exports = function reference(state, startLine, _endLine, silent) { |
|
|
// it's considered a lazy continuation regardless of what's there
|
|
|
// it's considered a lazy continuation regardless of what's there
|
|
|
if (state.tShift[nextLine] - state.blkIndent > 3) { continue; } |
|
|
if (state.tShift[nextLine] - state.blkIndent > 3) { continue; } |
|
|
|
|
|
|
|
|
|
|
|
// quirk for blockquotes, this line should already be checked by that rule
|
|
|
|
|
|
if (state.tShift[nextLine] < 0) { continue; } |
|
|
|
|
|
|
|
|
// Some tags can terminate paragraph without empty line.
|
|
|
// Some tags can terminate paragraph without empty line.
|
|
|
terminate = false; |
|
|
terminate = false; |
|
|
for (i = 0, l = terminatorRules.length; i < l; i++) { |
|
|
for (i = 0, l = terminatorRules.length; i < l; i++) { |
|
@ -3359,11 +3379,16 @@ module.exports = function reference(state, startLine, _endLine, silent) { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
label = normalizeReference(str.slice(1, labelEnd)); |
|
|
|
|
|
if (!label) { |
|
|
|
|
|
// CommonMark 0.20 disallows empty labels
|
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Reference can not terminate anything. This check is for safety only.
|
|
|
// Reference can not terminate anything. This check is for safety only.
|
|
|
/*istanbul ignore if*/ |
|
|
/*istanbul ignore if*/ |
|
|
if (silent) { return true; } |
|
|
if (silent) { return true; } |
|
|
|
|
|
|
|
|
label = normalizeReference(str.slice(1, labelEnd)); |
|
|
|
|
|
if (typeof state.env.references === 'undefined') { |
|
|
if (typeof state.env.references === 'undefined') { |
|
|
state.env.references = {}; |
|
|
state.env.references = {}; |
|
|
} |
|
|
} |
|
@ -3520,7 +3545,7 @@ StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF |
|
|
// Opt: don't use push queue for single line;
|
|
|
// Opt: don't use push queue for single line;
|
|
|
if (line + 1 === end) { |
|
|
if (line + 1 === end) { |
|
|
first = this.bMarks[line] + Math.min(this.tShift[line], indent); |
|
|
first = this.bMarks[line] + Math.min(this.tShift[line], indent); |
|
|
last = keepLastLF ? this.bMarks[end] : this.eMarks[end - 1]; |
|
|
last = this.eMarks[end - 1] + (keepLastLF ? 1 : 0); |
|
|
return this.src.slice(first, last); |
|
|
return this.src.slice(first, last); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -3936,8 +3961,6 @@ module.exports = function inline(state) { |
|
|
},{}],35:[function(require,module,exports){ |
|
|
},{}],35:[function(require,module,exports){ |
|
|
// Simple typographyc replacements
|
|
|
// Simple typographyc replacements
|
|
|
//
|
|
|
//
|
|
|
// '' → ‘’
|
|
|
|
|
|
// "" → “”. Set '«»' for Russian, '„“' for German, empty to disable
|
|
|
|
|
|
// (c) (C) → ©
|
|
|
// (c) (C) → ©
|
|
|
// (tm) (TM) → ™
|
|
|
// (tm) (TM) → ™
|
|
|
// (r) (R) → ®
|
|
|
// (r) (R) → ®
|
|
@ -4048,7 +4071,7 @@ function replaceAt(str, index, ch) { |
|
|
function process_inlines(tokens, state) { |
|
|
function process_inlines(tokens, state) { |
|
|
var i, token, text, t, pos, max, thisLevel, item, lastChar, nextChar, |
|
|
var i, token, text, t, pos, max, thisLevel, item, lastChar, nextChar, |
|
|
isLastPunctChar, isNextPunctChar, isLastWhiteSpace, isNextWhiteSpace, |
|
|
isLastPunctChar, isNextPunctChar, isLastWhiteSpace, isNextWhiteSpace, |
|
|
canOpen, canClose, j, isSingle, stack; |
|
|
canOpen, canClose, j, isSingle, stack, openQuote, closeQuote; |
|
|
|
|
|
|
|
|
stack = []; |
|
|
stack = []; |
|
|
|
|
|
|
|
@ -4133,16 +4156,28 @@ function process_inlines(tokens, state) { |
|
|
if (stack[j].level < thisLevel) { break; } |
|
|
if (stack[j].level < thisLevel) { break; } |
|
|
if (item.single === isSingle && stack[j].level === thisLevel) { |
|
|
if (item.single === isSingle && stack[j].level === thisLevel) { |
|
|
item = stack[j]; |
|
|
item = stack[j]; |
|
|
|
|
|
|
|
|
if (isSingle) { |
|
|
if (isSingle) { |
|
|
tokens[item.token].content = replaceAt( |
|
|
openQuote = state.md.options.quotes[2]; |
|
|
tokens[item.token].content, item.pos, state.md.options.quotes[2]); |
|
|
closeQuote = state.md.options.quotes[3]; |
|
|
token.content = replaceAt( |
|
|
|
|
|
token.content, t.index, state.md.options.quotes[3]); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
tokens[item.token].content = replaceAt( |
|
|
openQuote = state.md.options.quotes[0]; |
|
|
tokens[item.token].content, item.pos, state.md.options.quotes[0]); |
|
|
closeQuote = state.md.options.quotes[1]; |
|
|
token.content = replaceAt(token.content, t.index, state.md.options.quotes[1]); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// replace token.content *before* tokens[item.token].content,
|
|
|
|
|
|
// because, if they are pointing at the same token, replaceAt
|
|
|
|
|
|
// could mess up indices when quote length != 1
|
|
|
|
|
|
token.content = replaceAt(token.content, t.index, closeQuote); |
|
|
|
|
|
tokens[item.token].content = replaceAt( |
|
|
|
|
|
tokens[item.token].content, item.pos, openQuote); |
|
|
|
|
|
|
|
|
|
|
|
pos += closeQuote.length - 1; |
|
|
|
|
|
if (item.token === i) { pos += openQuote.length - 1; } |
|
|
|
|
|
|
|
|
|
|
|
text = token.content; |
|
|
|
|
|
max = text.length; |
|
|
|
|
|
|
|
|
stack.length = j; |
|
|
stack.length = j; |
|
|
continue OUTER; |
|
|
continue OUTER; |
|
|
} |
|
|
} |
|
@ -6630,8 +6665,11 @@ var src_path = exports.src_path = |
|
|
'\\"(?:(?!' + src_ZCc + '|["]).)+\\"|' + |
|
|
'\\"(?:(?!' + src_ZCc + '|["]).)+\\"|' + |
|
|
"\\'(?:(?!" + src_ZCc + "|[']).)+\\'|" + |
|
|
"\\'(?:(?!" + src_ZCc + "|[']).)+\\'|" + |
|
|
"\\'(?=" + src_pseudo_letter + ').|' + // allow `I'm_king` if no pair found
|
|
|
"\\'(?=" + src_pseudo_letter + ').|' + // allow `I'm_king` if no pair found
|
|
|
'\\.{2,3}[a-zA-Z0-9%]|' + // github has ... in commit range links. Restrict to
|
|
|
'\\.{2,3}[a-zA-Z0-9%/]|' + // github has ... in commit range links. Restrict to
|
|
|
// english & percent-encoded only, until more examples found.
|
|
|
// - english
|
|
|
|
|
|
// - percent-encoded
|
|
|
|
|
|
// - parts of file path
|
|
|
|
|
|
// until more examples found.
|
|
|
'\\.(?!' + src_ZCc + '|[.]).|' + |
|
|
'\\.(?!' + src_ZCc + '|[.]).|' + |
|
|
'\\-(?!' + src_ZCc + '|--(?:[^-]|$))(?:[-]+|.)|' + // `---` => long dash, terminate
|
|
|
'\\-(?!' + src_ZCc + '|--(?:[^-]|$))(?:[-]+|.)|' + // `---` => long dash, terminate
|
|
|
'\\,(?!' + src_ZCc + ').|' + // allow `,,,` in paths
|
|
|
'\\,(?!' + src_ZCc + ').|' + // allow `,,,` in paths
|
|
|