node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

20
server/node_modules/markdown-it-container/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,20 @@
3.0.0 / 2020-06-02
------------------
- Don't assume there are no classes, #26.
- Added bordering markup to validator params.
- Fix tests to work with latest `markdown-it`.
- Dev deps bump.
- Reorganize configs.
2.0.0 / 2015-10-05
------------------
- Markdown-it 5.0.0 support. Use 1.x version for 4.x.
1.0.0 / 2015-03-13
------------------
- First release.

22
server/node_modules/markdown-it-container/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
Copyright (c) 2015 Vitaly Puzrin, Alex Kocharin.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

95
server/node_modules/markdown-it-container/README.md generated vendored Normal file
View File

@@ -0,0 +1,95 @@
# markdown-it-container
[![Build Status](https://img.shields.io/travis/markdown-it/markdown-it-container/master.svg?style=flat)](https://travis-ci.org/markdown-it/markdown-it-container)
[![NPM version](https://img.shields.io/npm/v/markdown-it-container.svg?style=flat)](https://www.npmjs.org/package/markdown-it-container)
[![Coverage Status](https://img.shields.io/coveralls/markdown-it/markdown-it-container/master.svg?style=flat)](https://coveralls.io/r/markdown-it/markdown-it-container?branch=master)
> Plugin for creating block-level custom containers for [markdown-it](https://github.com/markdown-it/markdown-it) markdown parser.
__v2.+ requires `markdown-it` v5.+, see changelog.__
With this plugin you can create block containers like:
```
::: warning
*here be dragons*
:::
```
.... and specify how they should be rendered. If no renderer defined, `<div>` with
container name class will be created:
```html
<div class="warning">
<em>here be dragons</em>
</div>
```
Markup is the same as for [fenced code blocks](http://spec.commonmark.org/0.18/#fenced-code-blocks).
Difference is, that marker use another character and content is rendered as markdown markup.
## Installation
node.js, browser:
```bash
$ npm install markdown-it-container --save
$ bower install markdown-it-container --save
```
## API
```js
var md = require('markdown-it')()
.use(require('markdown-it-container'), name [, options]);
```
Params:
- __name__ - container name (mandatory)
- __options:__
- __validate__ - optional, function to validate tail after opening marker, should
return `true` on success.
- __render__ - optional, renderer function for opening/closing tokens.
- __marker__ - optional (`:`), character to use in delimiter.
## Example
```js
var md = require('markdown-it')();
md.use(require('markdown-it-container'), 'spoiler', {
validate: function(params) {
return params.trim().match(/^spoiler\s+(.*)$/);
},
render: function (tokens, idx) {
var m = tokens[idx].info.trim().match(/^spoiler\s+(.*)$/);
if (tokens[idx].nesting === 1) {
// opening tag
return '<details><summary>' + md.utils.escapeHtml(m[1]) + '</summary>\n';
} else {
// closing tag
return '</details>\n';
}
}
});
console.log(md.render('::: spoiler click me\n*content*\n:::\n'));
// Output:
//
// <details><summary>click me</summary>
// <p><em>content</em></p>
// </details>
```
## License
[MIT](https://github.com/markdown-it/markdown-it-container/blob/master/LICENSE)

26
server/node_modules/markdown-it-container/bower.json generated vendored Normal file
View File

@@ -0,0 +1,26 @@
{
"name": "markdown-it-container",
"main": "dist/markdown-it-container.js",
"homepage": "https://github.com/markdown-it/markdown-it-container",
"description": "Plugin to create block-level custom containers for markdown-it markdown parser",
"keywords": [
"markdown-it-plugin",
"markdown-it",
"markdown"
],
"license": "MIT",
"ignore": [
"**/.*",
"benchmark",
"bower_components",
"coverage",
"demo",
"docs",
"lib",
"node_modules",
"support",
"test",
"Makefile",
"index*"
]
}

View File

@@ -0,0 +1,149 @@
/*! 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<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
// Process block-level custom containers
//
'use strict';
module.exports = function container_plugin(md, name, options) {
// Second param may be useful if you decide
// to increase minimal allowed marker length
function validateDefault(params/*, markup*/) {
return params.trim().split(' ', 2)[0] === name;
}
function renderDefault(tokens, idx, _options, env, slf) {
// add a class to the opening tag
if (tokens[idx].nesting === 1) {
tokens[idx].attrJoin('class', name);
}
return slf.renderToken(tokens, idx, _options, env, slf);
}
options = options || {};
var min_markers = 3,
marker_str = options.marker || ':',
marker_char = marker_str.charCodeAt(0),
marker_len = marker_str.length,
validate = options.validate || validateDefault,
render = options.render || renderDefault;
function container(state, startLine, endLine, silent) {
var pos, nextLine, marker_count, markup, params, token,
old_parent, old_line_max,
auto_closed = false,
start = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// Check out the first character quickly,
// this should filter out most of non-containers
//
if (marker_char !== state.src.charCodeAt(start)) { return false; }
// Check out the rest of the marker string
//
for (pos = start + 1; pos <= max; pos++) {
if (marker_str[(pos - start) % marker_len] !== state.src[pos]) {
break;
}
}
marker_count = Math.floor((pos - start) / marker_len);
if (marker_count < min_markers) { return false; }
pos -= (pos - start) % marker_len;
markup = state.src.slice(start, pos);
params = state.src.slice(pos, max);
if (!validate(params, markup)) { return false; }
// Since start is found, we can report success here in validation mode
//
if (silent) { return true; }
// Search for the end of the block
//
nextLine = startLine;
for (;;) {
nextLine++;
if (nextLine >= 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)
});

View File

@@ -0,0 +1 @@
/*! markdown-it-container 3.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{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).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){return o(r[f][1][e]||e)}),s,s.exports,e,r,n,t)}return n[f].exports}for(var i="function"==typeof require&&require,f=0;f<t.length;f++)o(t[f]);return o}({1:[function(e,r,n){"use strict";r.exports=function(e,r,n){var t=(n=n||{}).marker||":",o=t.charCodeAt(0),i=t.length,f=n.validate||function(e){return e.trim().split(" ",2)[0]===r},a=n.render||function(e,n,t,o,i){return 1===e[n].nesting&&e[n].attrJoin("class",r),i.renderToken(e,n,t,o,i)};e.block.ruler.before("fence","container_"+r,(function(e,n,a,u){var c,s,l,d,p,k,b,h,m=!1,y=e.bMarks[n]+e.tShift[n],_=e.eMarks[n];if(o!==e.src.charCodeAt(y))return!1;for(c=y+1;c<=_&&t[(c-y)%i]===e.src[c];c++);if((l=Math.floor((c-y)/i))<3)return!1;if(c-=(c-y)%i,d=e.src.slice(y,c),p=e.src.slice(c,_),!f(p,d))return!1;if(u)return!0;for(s=n;!(++s>=a)&&!((y=e.bMarks[s]+e.tShift[s])<(_=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(o===e.src.charCodeAt(y)&&!(e.sCount[s]-e.blkIndent>=4)){for(c=y+1;c<=_&&t[(c-y)%i]===e.src[c];c++);if(!(Math.floor((c-y)/i)<l||(c-=(c-y)%i,(c=e.skipSpaces(c))<_))){m=!0;break}}return b=e.parentType,h=e.lineMax,e.parentType="container",e.lineMax=s,(k=e.push("container_"+r+"_open","div",1)).markup=d,k.block=!0,k.info=p,k.map=[n,s],e.md.block.tokenize(e,n+1,s),(k=e.push("container_"+r+"_close","div",-1)).markup=e.src.slice(y,c),k.block=!0,e.parentType=b,e.lineMax=h,e.line=s+(m?1:0),!0}),{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules["container_"+r+"_open"]=a,e.renderer.rules["container_"+r+"_close"]=a}},{}]},{},[1])(1)}));

145
server/node_modules/markdown-it-container/index.js generated vendored Normal file
View File

@@ -0,0 +1,145 @@
// Process block-level custom containers
//
'use strict';
module.exports = function container_plugin(md, name, options) {
// Second param may be useful if you decide
// to increase minimal allowed marker length
function validateDefault(params/*, markup*/) {
return params.trim().split(' ', 2)[0] === name;
}
function renderDefault(tokens, idx, _options, env, slf) {
// add a class to the opening tag
if (tokens[idx].nesting === 1) {
tokens[idx].attrJoin('class', name);
}
return slf.renderToken(tokens, idx, _options, env, slf);
}
options = options || {};
var min_markers = 3,
marker_str = options.marker || ':',
marker_char = marker_str.charCodeAt(0),
marker_len = marker_str.length,
validate = options.validate || validateDefault,
render = options.render || renderDefault;
function container(state, startLine, endLine, silent) {
var pos, nextLine, marker_count, markup, params, token,
old_parent, old_line_max,
auto_closed = false,
start = state.bMarks[startLine] + state.tShift[startLine],
max = state.eMarks[startLine];
// Check out the first character quickly,
// this should filter out most of non-containers
//
if (marker_char !== state.src.charCodeAt(start)) { return false; }
// Check out the rest of the marker string
//
for (pos = start + 1; pos <= max; pos++) {
if (marker_str[(pos - start) % marker_len] !== state.src[pos]) {
break;
}
}
marker_count = Math.floor((pos - start) / marker_len);
if (marker_count < min_markers) { return false; }
pos -= (pos - start) % marker_len;
markup = state.src.slice(start, pos);
params = state.src.slice(pos, max);
if (!validate(params, markup)) { return false; }
// Since start is found, we can report success here in validation mode
//
if (silent) { return true; }
// Search for the end of the block
//
nextLine = startLine;
for (;;) {
nextLine++;
if (nextLine >= 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;
};

28
server/node_modules/markdown-it-container/package.json generated vendored Normal file
View File

@@ -0,0 +1,28 @@
{
"name": "markdown-it-container",
"version": "3.0.0",
"description": "Plugin to create block-level custom containers for markdown-it markdown parser",
"repository": "markdown-it/markdown-it-container",
"license": "MIT",
"scripts": {
"lint": "eslint .",
"test": "npm run lint && nyc mocha",
"coverage": "npm run test && nyc report --reporter html",
"report-coveralls": "nyc report --reporter=text-lcov | coveralls"
},
"keywords": [
"markdown-it-plugin",
"markdown-it",
"markdown"
],
"devDependencies": {
"browserify": "^16.5.1",
"coveralls": "^3.1.0",
"eslint": "^7.1.0",
"markdown-it": "markdown-it/markdown-it",
"markdown-it-testgen": "~0.1.0",
"mocha": "^7.2.0",
"nyc": "^15.1.0",
"terser": "^4.7.0"
}
}