|
|
@ -1,4 +1,4 @@ |
|
|
|
/*! markdown-it 6.0.5 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 6.1.0 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 }
|
|
|
|
//
|
|
|
|
'use strict'; |
|
|
@ -1748,11 +1748,10 @@ default_rules.fence = function (tokens, idx, options, env, slf) { |
|
|
|
var token = tokens[idx], |
|
|
|
info = token.info ? unescapeAll(token.info).trim() : '', |
|
|
|
langName = '', |
|
|
|
highlighted; |
|
|
|
highlighted, i, tmpAttrs, tmpToken; |
|
|
|
|
|
|
|
if (info) { |
|
|
|
langName = info.split(/\s+/g)[0]; |
|
|
|
token.attrJoin('class', options.langPrefix + langName); |
|
|
|
} |
|
|
|
|
|
|
|
if (options.highlight) { |
|
|
@ -1765,6 +1764,30 @@ default_rules.fence = function (tokens, idx, options, env, slf) { |
|
|
|
return highlighted + '\n'; |
|
|
|
} |
|
|
|
|
|
|
|
// If language exists, inject class gently, without mudofying original token.
|
|
|
|
// May be, one day we will add .clone() for token and simplify this part, but
|
|
|
|
// now we prefer to keep things local.
|
|
|
|
if (info) { |
|
|
|
i = token.attrIndex('class'); |
|
|
|
tmpAttrs = token.attrs ? token.attrs.slice() : []; |
|
|
|
|
|
|
|
if (i < 0) { |
|
|
|
tmpAttrs.push([ 'class', options.langPrefix + langName ]); |
|
|
|
} else { |
|
|
|
tmpAttrs[i] += ' ' + options.langPrefix + langName; |
|
|
|
} |
|
|
|
|
|
|
|
// Fake token just to render attributes
|
|
|
|
tmpToken = { |
|
|
|
attrs: tmpAttrs |
|
|
|
}; |
|
|
|
|
|
|
|
return '<pre><code' + slf.renderAttrs(tmpToken) + '>' |
|
|
|
+ highlighted |
|
|
|
+ '</code></pre>\n'; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return '<pre><code' + slf.renderAttrs(token) + '>' |
|
|
|
+ highlighted |
|
|
|
+ '</code></pre>\n'; |
|
|
@ -6525,8 +6548,8 @@ function compile(self) { |
|
|
|
.map(escapeRE) |
|
|
|
.join('|'); |
|
|
|
// (?!_) cause 1.5x slowdown
|
|
|
|
self.re.schema_test = RegExp('(^|(?!_)(?:>|' + re.src_ZPCc + '))(' + slist + ')', 'i'); |
|
|
|
self.re.schema_search = RegExp('(^|(?!_)(?:>|' + re.src_ZPCc + '))(' + slist + ')', 'ig'); |
|
|
|
self.re.schema_test = RegExp('(^|(?!_)(?:[><]|' + re.src_ZPCc + '))(' + slist + ')', 'i'); |
|
|
|
self.re.schema_search = RegExp('(^|(?!_)(?:[><]|' + re.src_ZPCc + '))(' + slist + ')', 'ig'); |
|
|
|
|
|
|
|
self.re.pretest = RegExp( |
|
|
|
'(' + self.re.schema_test.source + ')|' + |
|
|
@ -6916,7 +6939,7 @@ var src_ZCc = exports.src_ZCc = [ src_Z, src_Cc ].join('|'); |
|
|
|
// All possible word characters (everything without punctuation, spaces & controls)
|
|
|
|
// Defined via punctuation & spaces to save space
|
|
|
|
// Should be something like \p{\L\N\S\M} (\w but without `_`)
|
|
|
|
var src_pseudo_letter = '(?:(?!' + src_ZPCc + ')' + src_Any + ')'; |
|
|
|
var src_pseudo_letter = '(?:(?!>|<|' + src_ZPCc + ')' + src_Any + ')'; |
|
|
|
// The same as abothe but without [0-9]
|
|
|
|
// var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';
|
|
|
|
|
|
|
@ -6935,14 +6958,14 @@ var src_port = exports.src_port = |
|
|
|
|
|
|
|
var src_host_terminator = exports.src_host_terminator = |
|
|
|
|
|
|
|
'(?=$|' + src_ZPCc + ')(?!-|_|:\\d|\\.-|\\.(?!$|' + src_ZPCc + '))'; |
|
|
|
'(?=$|>|<|' + src_ZPCc + ')(?!-|_|:\\d|\\.-|\\.(?!$|' + src_ZPCc + '))'; |
|
|
|
|
|
|
|
var src_path = exports.src_path = |
|
|
|
|
|
|
|
'(?:' + |
|
|
|
'[/?#]' + |
|
|
|
'(?:' + |
|
|
|
'(?!' + src_ZCc + '|[()[\\]{}.,"\'?!\\-]).|' + |
|
|
|
'(?!' + src_ZCc + '|[()[\\]{}.,"\'?!\\-<>]).|' + |
|
|
|
'\\[(?:(?!' + src_ZCc + '|\\]).)*\\]|' + |
|
|
|
'\\((?:(?!' + src_ZCc + '|[)]).)*\\)|' + |
|
|
|
'\\{(?:(?!' + src_ZCc + '|[}]).)*\\}|' + |
|
|
@ -7044,11 +7067,11 @@ var tpl_host_port_no_ip_fuzzy_strict = exports.tpl_host_port_no_ip_fuzzy_strict |
|
|
|
// Rude test fuzzy links by host, for quick deny
|
|
|
|
exports.tpl_host_fuzzy_test = |
|
|
|
|
|
|
|
'localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + src_ZPCc + '|$))'; |
|
|
|
'localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + src_ZPCc + '|>|$))'; |
|
|
|
|
|
|
|
exports.tpl_email_fuzzy = |
|
|
|
|
|
|
|
'(^|>|\\(|' + src_ZCc + ')(' + src_email_name + '@' + tpl_host_fuzzy_strict + ')'; |
|
|
|
'(^|<|>|\\(|' + src_ZCc + ')(' + src_email_name + '@' + tpl_host_fuzzy_strict + ')'; |
|
|
|
|
|
|
|
exports.tpl_link_fuzzy = |
|
|
|
// Fuzzy link can't be prepended with .:/\- and non punctuation.
|
|
|
|