Browse Source

Browser files rebuild

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

61
dist/markdown-it.js

@ -1,4 +1,4 @@
/*! 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){
/*! markdown-it 8.3.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){
// HTML5 entities map: { name -> utf16string }
//
'use strict';
@ -2423,6 +2423,7 @@ module.exports = function blockquote(state, startLine, endLine, silent) {
ch,
i,
initial,
isOutdented,
l,
lastLineEmpty,
lines,
@ -2438,9 +2439,13 @@ module.exports = function blockquote(state, startLine, endLine, silent) {
terminate,
terminatorRules,
token,
oldLineMax = state.lineMax,
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
// check the block quote marker
if (state.src.charCodeAt(pos++) !== 0x3E/* > */) { return false; }
@ -2448,9 +2453,6 @@ module.exports = function blockquote(state, startLine, endLine, silent) {
// so no point trying to find the end of it in silent mode
if (silent) { return true; }
oldIndent = state.blkIndent;
state.blkIndent = 0;
// skip spaces after ">" and re-calculate offset
initial = offset = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine]);
@ -2531,13 +2533,21 @@ module.exports = function blockquote(state, startLine, endLine, silent) {
// >
// test
// ```
// 3. another tag
// 3. another tag:
// ```
// > test
// - - -
// ```
for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {
if (state.sCount[nextLine] < oldIndent) { break; }
// check if it's outdented, i.e. it's inside list item and indented
// less than said list item:
//
// ```
// 1. anything
// > current blockquote
// 2. checking this line
// ```
isOutdented = state.sCount[nextLine] < state.blkIndent;
pos = state.bMarks[nextLine] + state.tShift[nextLine];
max = state.eMarks[nextLine];
@ -2547,7 +2557,7 @@ module.exports = function blockquote(state, startLine, endLine, silent) {
break;
}
if (state.src.charCodeAt(pos++) === 0x3E/* > */) {
if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !isOutdented) {
// This line is inside the blockquote.
// skip spaces after ">" and re-calculate offset
@ -2627,7 +2637,13 @@ module.exports = function blockquote(state, startLine, endLine, silent) {
}
if (terminate) {
if (oldIndent !== 0) {
// Quirk to enforce "hard termination mode" for paragraphs;
// normally if you call `tokenize(state, startLine, nextLine)`,
// paragraphs will look below nextLine for paragraph continuation,
// but if blockquote is terminated by another tag, they shouldn't
state.lineMax = nextLine;
if (state.blkIndent !== 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
@ -2635,12 +2651,14 @@ module.exports = function blockquote(state, startLine, endLine, silent) {
oldBSCount.push(state.bsCount[nextLine]);
oldTShift.push(state.tShift[nextLine]);
oldSCount.push(state.sCount[nextLine]);
state.sCount[nextLine] -= oldIndent;
state.sCount[nextLine] -= state.blkIndent;
}
break;
}
if (isOutdented) break;
oldBMarks.push(state.bMarks[nextLine]);
oldBSCount.push(state.bsCount[nextLine]);
oldTShift.push(state.tShift[nextLine]);
@ -2651,6 +2669,9 @@ module.exports = function blockquote(state, startLine, endLine, silent) {
state.sCount[nextLine] = -1;
}
oldIndent = state.blkIndent;
state.blkIndent = 0;
token = state.push('blockquote_open', 'blockquote', 1);
token.markup = '>';
token.map = lines = [ startLine, 0 ];
@ -2660,6 +2681,7 @@ module.exports = function blockquote(state, startLine, endLine, silent) {
token = state.push('blockquote_close', 'blockquote', -1);
token.markup = '>';
state.lineMax = oldLineMax;
state.parentType = oldParentType;
lines[1] = state.line;
@ -2724,6 +2746,9 @@ module.exports = function fence(state, startLine, endLine, silent) {
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
if (pos + 3 > max) { return false; }
marker = state.src.charCodeAt(pos);
@ -2818,6 +2843,9 @@ module.exports = function heading(state, startLine, endLine, silent) {
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
ch = state.src.charCodeAt(pos);
if (ch !== 0x23/* # */ || pos >= max) { return false; }
@ -2872,6 +2900,9 @@ module.exports = function hr(state, startLine, endLine, silent) {
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
marker = state.src.charCodeAt(pos++);
// Check hr marker
@ -2931,6 +2962,9 @@ module.exports = function html_block(state, startLine, endLine, silent) {
pos = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
if (!state.md.options.html) { return false; }
if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false; }
@ -2987,6 +3021,9 @@ module.exports = function lheading(state, startLine, endLine/*, silent*/) {
nextLine = startLine + 1, oldParentType,
terminatorRules = state.md.block.ruler.getRules('paragraph');
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
oldParentType = state.parentType;
state.parentType = 'paragraph'; // use paragraph to match terminatorRules
@ -3190,6 +3227,9 @@ module.exports = function list(state, startLine, endLine, silent) {
isTerminatingParagraph = false,
tight = true;
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
// limit conditions when list can interrupt
// a paragraph (validation mode only)
if (silent && state.parentType === 'paragraph') {
@ -3479,6 +3519,9 @@ module.exports = function reference(state, startLine, _endLine, silent) {
max = state.eMarks[startLine],
nextLine = startLine + 1;
// if it's indented more than 3 spaces, it should be a code block
if (state.sCount[startLine] - state.blkIndent >= 4) { return false; }
if (state.src.charCodeAt(pos) !== 0x5B/* [ */) { return false; }
// Simple check to quickly interrupt scan on [link](url) at the start of line.

10
dist/markdown-it.min.js

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