From 26105034da4fcce7ac883c899d781f016559310d Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 8 Nov 2018 00:38:48 +0800 Subject: switch to vuepress --- .../dist/markdown-it-container.js | 147 +++++++++++++++++++++ .../dist/markdown-it-container.min.js | 2 + 2 files changed, 149 insertions(+) create mode 100644 node_modules/markdown-it-container/dist/markdown-it-container.js create mode 100644 node_modules/markdown-it-container/dist/markdown-it-container.min.js (limited to 'node_modules/markdown-it-container/dist') diff --git a/node_modules/markdown-it-container/dist/markdown-it-container.js b/node_modules/markdown-it-container/dist/markdown-it-container.js new file mode 100644 index 00000000..3dfdb99e --- /dev/null +++ b/node_modules/markdown-it-container/dist/markdown-it-container.js @@ -0,0 +1,147 @@ +/*! markdown-it-container 2.0.0 https://github.com//markdown-it/markdown-it-container @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.markdownitContainer = 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= endLine) { + // unclosed block should be autoclosed by end of document. + // also block seems to be autoclosed by end of parent + break; + } + + start = state.bMarks[nextLine] + state.tShift[nextLine]; + max = state.eMarks[nextLine]; + + if (start < max && state.sCount[nextLine] < state.blkIndent) { + // non-empty line with negative indent should stop the list: + // - ``` + // test + break; + } + + if (marker_char !== state.src.charCodeAt(start)) { continue; } + + if (state.sCount[nextLine] - state.blkIndent >= 4) { + // closing fence should be indented less than 4 spaces + continue; + } + + for (pos = start + 1; pos <= max; pos++) { + if (marker_str[(pos - start) % marker_len] !== state.src[pos]) { + break; + } + } + + // closing code fence must be at least as long as the opening one + if (Math.floor((pos - start) / marker_len) < marker_count) { continue; } + + // make sure tail has spaces only + pos -= (pos - start) % marker_len; + pos = state.skipSpaces(pos); + + if (pos < max) { continue; } + + // found! + auto_closed = true; + break; + } + + old_parent = state.parentType; + old_line_max = state.lineMax; + state.parentType = 'container'; + + // this will prevent lazy continuations from ever going past our end marker + state.lineMax = nextLine; + + token = state.push('container_' + name + '_open', 'div', 1); + token.markup = markup; + token.block = true; + token.info = params; + token.map = [ startLine, nextLine ]; + + state.md.block.tokenize(state, startLine + 1, nextLine); + + token = state.push('container_' + name + '_close', 'div', -1); + token.markup = state.src.slice(start, pos); + token.block = true; + + state.parentType = old_parent; + state.lineMax = old_line_max; + state.line = nextLine + (auto_closed ? 1 : 0); + + return true; + } + + md.block.ruler.before('fence', 'container_' + name, container, { + alt: [ 'paragraph', 'reference', 'blockquote', 'list' ] + }); + md.renderer.rules['container_' + name + '_open'] = render; + md.renderer.rules['container_' + name + '_close'] = render; +}; + +},{}]},{},[1])(1) +}); \ No newline at end of file diff --git a/node_modules/markdown-it-container/dist/markdown-it-container.min.js b/node_modules/markdown-it-container/dist/markdown-it-container.min.js new file mode 100644 index 00000000..cbbe1a25 --- /dev/null +++ b/node_modules/markdown-it-container/dist/markdown-it-container.min.js @@ -0,0 +1,2 @@ +/*! markdown-it-container 2.0.0 https://github.com//markdown-it/markdown-it-container @license MIT */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.markdownitContainer=e()}}(function(){return function e(r,n,t){function o(f,a){if(!n[f]){if(!r[f]){var u="function"==typeof require&&require;if(!a&&u)return u(f,!0);if(i)return i(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var s=n[f]={exports:{}};r[f][0].call(s.exports,function(e){var n=r[f][1][e];return o(n?n:e)},s,s.exports,e,r,n,t)}return n[f].exports}for(var i="function"==typeof require&&require,f=0;f=i&&a[(i-y)%c]===e.src[i];i++);if(d=Math.floor((i-y)/c),f>d)return!1;if(i-=(i-y)%c,p=e.src.slice(y,i),k=e.src.slice(i,_),!s(k))return!1;if(o)return!0;for(l=n;(l++,!(l>=t))&&(y=e.bMarks[l]+e.tShift[l],_=e.eMarks[l],!(_>y&&e.sCount[l]=4)){for(i=y+1;_>=i&&a[(i-y)%c]===e.src[i];i++);if(!(Math.floor((i-y)/c)i))){v=!0;break}}return b=e.parentType,m=e.lineMax,e.parentType="container",e.lineMax=l,h=e.push("container_"+r+"_open","div",1),h.markup=p,h.block=!0,h.info=k,h.map=[n,l],e.md.block.tokenize(e,n+1,l),h=e.push("container_"+r+"_close","div",-1),h.markup=e.src.slice(y,i),h.block=!0,e.parentType=b,e.lineMax=m,e.line=l+(v?1:0),!0}n=n||{};var f=3,a=n.marker||":",u=a.charCodeAt(0),c=a.length,s=n.validate||t,l=n.render||o;e.block.ruler.before("fence","container_"+r,i,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules["container_"+r+"_open"]=l,e.renderer.rules["container_"+r+"_close"]=l}},{}]},{},[1])(1)}); -- cgit v1.2.3