Browse Source

Browser files rebuild

pull/343/head
Vitaly Puzrin 8 years ago
parent
commit
b670878de2
  1. 67
      dist/markdown-it.js
  2. 10
      dist/markdown-it.min.js

67
dist/markdown-it.js

@ -1,4 +1,4 @@
/*! markdown-it 8.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){
/*! markdown-it 8.3.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';
@ -1101,6 +1101,10 @@ MarkdownIt.prototype.use = function (plugin /*, params, ... */) {
* and then pass updated object to renderer.
**/
MarkdownIt.prototype.parse = function (src, env) {
if (typeof src !== 'string') {
throw new Error('Input data should be a String');
}
var state = new this.core.State(src, this, env);
this.core.process(state);
@ -2621,7 +2625,21 @@ module.exports = function blockquote(state, startLine, endLine, silent) {
break;
}
}
if (terminate) { break; }
if (terminate) {
if (oldIndent !== 0) {
// state.blkIndent was non-zero, we now set it to zero,
// so we need to re-calculate all offsets to appear as
// if indent wasn't changed
oldBMarks.push(state.bMarks[nextLine]);
oldBSCount.push(state.bsCount[nextLine]);
oldTShift.push(state.tShift[nextLine]);
oldSCount.push(state.sCount[nextLine]);
state.sCount[nextLine] -= oldIndent;
}
break;
}
oldBMarks.push(state.bMarks[nextLine]);
oldBSCount.push(state.bsCount[nextLine]);
@ -3931,13 +3949,16 @@ module.exports = function table(state, startLine, endLine, silent) {
var ch, lineText, pos, i, nextLine, columns, columnCount, token,
aligns, t, tableLines, tbodyLines;
// should have at least three lines
// should have at least two lines
if (startLine + 2 > endLine) { return false; }
nextLine = startLine + 1;
if (state.sCount[nextLine] < state.blkIndent) { return false; }
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[nextLine] - state.blkIndent >= 4) { return false; }
// first character of the second line should be '|', '-', ':',
// and no other characters are allowed but spaces;
// basically, this is the equivalent of /^[-:|][-:|\s]*$/ regexp
@ -3984,6 +4005,7 @@ module.exports = function table(state, startLine, endLine, silent) {
lineText = getLine(state, startLine).trim();
if (lineText.indexOf('|') === -1) { return false; }
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
columns = escapedSplit(lineText.replace(/^\||\|$/g, ''));
// header row will define an amount of columns in the entire table,
@ -4026,12 +4048,10 @@ module.exports = function table(state, startLine, endLine, silent) {
for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {
if (state.sCount[nextLine] < state.blkIndent) { break; }
lineText = getLine(state, nextLine);
lineText = getLine(state, nextLine).trim();
if (lineText.indexOf('|') === -1) { break; }
// keep spaces at beginning of line to indicate an empty first cell, but
// strip trailing whitespace
columns = escapedSplit(lineText.replace(/^\||\|\s*$/g, ''));
if (state.sCount[nextLine] - state.blkIndent >= 4) { break; }
columns = escapedSplit(lineText.replace(/^\||\|$/g, ''));
token = state.push('tr_open', 'tr', 1);
for (i = 0; i < columnCount; i++) {
@ -5330,6 +5350,9 @@ module.exports = function link(state, silent) {
'use strict';
var isSpace = require('../common/utils').isSpace;
module.exports = function newline(state, silent) {
var pmax, max, pos = state.pos;
@ -5360,13 +5383,13 @@ module.exports = function newline(state, silent) {
pos++;
// skip heading spaces for next line
while (pos < max && state.src.charCodeAt(pos) === 0x20) { pos++; }
while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++; }
state.pos = pos;
return true;
};
},{}],47:[function(require,module,exports){
},{"../common/utils":4}],47:[function(require,module,exports){
// Inline parser state
'use strict';
@ -6201,8 +6224,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('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');
self.re.schema_search = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');
self.re.pretest = RegExp(
'(' + self.re.schema_test.source + ')|' +
@ -6602,10 +6625,14 @@ module.exports = function (opts) {
// \p{\Z\Cc} (white spaces + control)
re.src_ZCc = [ re.src_Z, re.src_Cc ].join('|');
// Experimental. List of chars, completely prohibited in links
// because can separate it from other part of text
var text_separators = '[><\uff5c]';
// 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 `_`)
re.src_pseudo_letter = '(?:(?!>|<|' + re.src_ZPCc + ')' + re.src_Any + ')';
re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')';
// The same as abothe but without [0-9]
// var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';
@ -6624,14 +6651,14 @@ module.exports = function (opts) {
re.src_host_terminator =
'(?=$|>|<|' + re.src_ZPCc + ')(?!-|_|:\\d|\\.-|\\.(?!$|' + re.src_ZPCc + '))';
'(?=$|' + text_separators + '|' + re.src_ZPCc + ')(?!-|_|:\\d|\\.-|\\.(?!$|' + re.src_ZPCc + '))';
re.src_path =
'(?:' +
'[/?#]' +
'(?:' +
'(?!' + re.src_ZCc + '|[()[\\]{}.,"\'?!\\-<>]).|' +
'(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\]{}.,"\'?!\\-]).|' +
'\\[(?:(?!' + re.src_ZCc + '|\\]).)*\\]|' +
'\\((?:(?!' + re.src_ZCc + '|[)]).)*\\)|' +
'\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\}|' +
@ -6741,19 +6768,19 @@ module.exports = function (opts) {
re.tpl_email_fuzzy =
'(^|<|>|\\(|' + re.src_ZCc + ')(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';
'(^|' + text_separators + '|\\(|' + re.src_ZCc + ')(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';
re.tpl_link_fuzzy =
// Fuzzy link can't be prepended with .:/\- and non punctuation.
// but can start with > (markdown blockquote)
'(^|(?![.:/\\-_@])(?:[$+<=>^`|]|' + re.src_ZPCc + '))' +
'((?![$+<=>^`|])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')';
'(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' +
'((?![$+<=>^`|\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')';
re.tpl_link_no_ip_fuzzy =
// Fuzzy link can't be prepended with .:/\- and non punctuation.
// but can start with > (markdown blockquote)
'(^|(?![.:/\\-_@])(?:[$+<=>^`|]|' + re.src_ZPCc + '))' +
'((?![$+<=>^`|])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';
'(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' +
'((?![$+<=>^`|\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';
return re;
};

10
dist/markdown-it.min.js

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save