1
0
Fork 0
mirror of https://github.com/marty-oehme/scripts.git synced 2024-12-22 07:58:08 +00:00

updated markdown-it to 8.4.2

This commit is contained in:
Patrizio Bekerle 2018-11-12 16:58:41 +01:00
parent 7f27b4d9a7
commit 75f9da8ff6
No known key found for this signature in database
GPG key ID: 2E9FFD770DABE838

View file

@ -1,4 +1,4 @@
/*! markdown-it 8.3.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){ /*! markdown-it 8.4.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(){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}return e})()({1:[function(require,module,exports){
// HTML5 entities map: { name -> utf16string } // HTML5 entities map: { name -> utf16string }
// //
'use strict'; 'use strict';
@ -64,10 +64,8 @@ module.exports = [
'option', 'option',
'p', 'p',
'param', 'param',
'pre',
'section', 'section',
'source', 'source',
'title',
'summary', 'summary',
'table', 'table',
'tbody', 'tbody',
@ -459,18 +457,18 @@ module.exports = function parseLinkDestination(str, pos, max) {
if (code === 0x28 /* ( */) { if (code === 0x28 /* ( */) {
level++; level++;
if (level > 1) { break; }
} }
if (code === 0x29 /* ) */) { if (code === 0x29 /* ) */) {
if (level === 0) { break; }
level--; level--;
if (level < 0) { break; }
} }
pos++; pos++;
} }
if (start === pos) { return result; } if (start === pos) { return result; }
if (level !== 0) { return result; }
result.str = unescapeAll(str.slice(start, pos)); result.str = unescapeAll(str.slice(start, pos));
result.lines = lines; result.lines = lines;
@ -1867,7 +1865,7 @@ function Renderer() {
* var result = md.renderInline(...); * var result = md.renderInline(...);
* ``` * ```
* *
* Each rule is called as independed static function with fixed signature: * Each rule is called as independent static function with fixed signature:
* *
* ```javascript * ```javascript
* function my_token_render(tokens, idx, options, env, renderer) { * function my_token_render(tokens, idx, options, env, renderer) {
@ -2163,7 +2161,7 @@ Ruler.prototype.__compile__ = function () {
* *
* ##### Example * ##### Example
* *
* Replace existing typorgapher replacement rule with new one: * Replace existing typographer replacement rule with new one:
* *
* ```javascript * ```javascript
* var md = require('markdown-it')(); * var md = require('markdown-it')();
@ -4477,7 +4475,8 @@ function process_inlines(tokens, state) {
lastChar = text.charCodeAt(t.index - 1); lastChar = text.charCodeAt(t.index - 1);
} else { } else {
for (j = i - 1; j >= 0; j--) { for (j = i - 1; j >= 0; j--) {
if (tokens[j].type !== 'text') { continue; } if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // lastChar defaults to 0x20
if (tokens[j].type !== 'text') continue;
lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1); lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);
break; break;
@ -4493,7 +4492,8 @@ function process_inlines(tokens, state) {
nextChar = text.charCodeAt(pos); nextChar = text.charCodeAt(pos);
} else { } else {
for (j = i + 1; j < tokens.length; j++) { for (j = i + 1; j < tokens.length; j++) {
if (tokens[j].type !== 'text') { continue; } if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // nextChar defaults to 0x20
if (tokens[j].type !== 'text') continue;
nextChar = tokens[j].content.charCodeAt(0); nextChar = tokens[j].content.charCodeAt(0);
break; break;
@ -4877,7 +4877,7 @@ module.exports.postProcess = function emphasis(state) {
delimiters = state.delimiters, delimiters = state.delimiters,
max = state.delimiters.length; max = state.delimiters.length;
for (i = 0; i < max; i++) { for (i = max - 1; i >= 0; i--) {
startDelim = delimiters[i]; startDelim = delimiters[i];
if (startDelim.marker !== 0x5F/* _ */ && startDelim.marker !== 0x2A/* * */) { if (startDelim.marker !== 0x5F/* _ */ && startDelim.marker !== 0x2A/* * */) {
@ -4891,16 +4891,16 @@ module.exports.postProcess = function emphasis(state) {
endDelim = delimiters[startDelim.end]; endDelim = delimiters[startDelim.end];
// If the next delimiter has the same marker and is adjacent to this one, // If the previous delimiter has the same marker and is adjacent to this one,
// merge those into one strong delimiter. // merge those into one strong delimiter.
// //
// `<em><em>whatever</em></em>` -> `<strong>whatever</strong>` // `<em><em>whatever</em></em>` -> `<strong>whatever</strong>`
// //
isStrong = i + 1 < max && isStrong = i > 0 &&
delimiters[i + 1].end === startDelim.end - 1 && delimiters[i - 1].end === startDelim.end + 1 &&
delimiters[i + 1].token === startDelim.token + 1 && delimiters[i - 1].token === startDelim.token - 1 &&
delimiters[startDelim.end - 1].token === endDelim.token - 1 && delimiters[startDelim.end + 1].token === endDelim.token + 1 &&
delimiters[i + 1].marker === startDelim.marker; delimiters[i - 1].marker === startDelim.marker;
ch = String.fromCharCode(startDelim.marker); ch = String.fromCharCode(startDelim.marker);
@ -4919,9 +4919,9 @@ module.exports.postProcess = function emphasis(state) {
token.content = ''; token.content = '';
if (isStrong) { if (isStrong) {
state.tokens[delimiters[i + 1].token].content = ''; state.tokens[delimiters[i - 1].token].content = '';
state.tokens[delimiters[startDelim.end - 1].token].content = ''; state.tokens[delimiters[startDelim.end + 1].token].content = '';
i++; i--;
} }
} }
}; };
@ -7941,7 +7941,7 @@ module.exports=/[\0-\x1F\x7F-\x9F]/
},{}],62:[function(require,module,exports){ },{}],62:[function(require,module,exports){
module.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/ module.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/
},{}],63:[function(require,module,exports){ },{}],63:[function(require,module,exports){
module.exports=/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E44\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/ module.exports=/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E49\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/
},{}],64:[function(require,module,exports){ },{}],64:[function(require,module,exports){
module.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/ module.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/
},{}],65:[function(require,module,exports){ },{}],65:[function(require,module,exports){