/*! markdown-it-container 3.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(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i= 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) });