planning
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s

This commit is contained in:
2024-10-14 09:15:30 +02:00
parent bcba00a730
commit 6e64e138e2
21059 changed files with 2317811 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
'use strict'
module.exports = blockquote
var lineFeed = '\n'
var space = ' '
var greaterThan = '>'
function blockquote(node) {
var values = this.block(node).split(lineFeed)
var result = []
var length = values.length
var index = -1
var value
while (++index < length) {
value = values[index]
result[index] = (value ? space : '') + value
}
return greaterThan + result.join(lineFeed + greaterThan)
}

14
node_modules/remark-stringify/lib/visitors/break.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
'use strict'
module.exports = lineBreak
var backslash = '\\'
var lineFeed = '\n'
var space = ' '
var commonmark = backslash + lineFeed
var normal = space + space + lineFeed
function lineBreak() {
return this.options.commonmark ? commonmark : normal
}

79
node_modules/remark-stringify/lib/visitors/code.js generated vendored Normal file
View File

@@ -0,0 +1,79 @@
'use strict'
var streak = require('longest-streak')
var repeat = require('repeat-string')
var pad = require('../util/pad')
module.exports = code
var lineFeed = '\n'
var space = ' '
// Stringify code.
// Creates indented code when:
//
// - No language tag exists
// - Not in `fences: true` mode
// - A non-empty value exists
//
// Otherwise, GFM fenced code is created:
//
// ````markdown
// ```js
// foo();
// ```
// ````
//
// When in ``fence: `~` `` mode, uses tildes as fences:
//
// ```markdown
// ~~~js
// foo();
// ~~~
// ```
//
// Knows about internal fences:
//
// `````markdown
// ````markdown
// ```javascript
// foo();
// ```
// ````
// `````
function code(node, parent) {
var self = this
var value = node.value
var options = self.options
var marker = options.fence
var info = node.lang || ''
var fence
if (info && node.meta) {
info += space + node.meta
}
info = self.encode(self.escape(info, node))
// Without (needed) fences.
if (!info && !options.fences && value) {
// Throw when pedantic, in a list item which isnt compiled using a tab.
if (
parent &&
parent.type === 'listItem' &&
options.listItemIndent !== 'tab' &&
options.pedantic
) {
self.file.fail(
'Cannot indent code properly. See https://git.io/fxKR8',
node.position
)
}
return pad(value, 1)
}
fence = repeat(marker, Math.max(streak(value, marker) + 1, 3))
return fence + info + lineFeed + value + lineFeed + fence
}

View File

@@ -0,0 +1,36 @@
'use strict'
var uri = require('../util/enclose-uri')
var title = require('../util/enclose-title')
module.exports = definition
var space = ' '
var colon = ':'
var leftSquareBracket = '['
var rightSquareBracket = ']'
// Stringify an URL definition.
//
// Is smart about enclosing `url` (see `encloseURI()`) and `title` (see
// `encloseTitle()`).
//
// ```markdown
// [foo]: <foo at bar dot com> 'An "example" e-mail'
// ```
function definition(node) {
var content = uri(node.url)
if (node.title) {
content += space + title(node.title)
}
return (
leftSquareBracket +
(node.label || node.identifier) +
rightSquareBracket +
colon +
space +
content
)
}

11
node_modules/remark-stringify/lib/visitors/delete.js generated vendored Normal file
View File

@@ -0,0 +1,11 @@
'use strict'
module.exports = strikethrough
var tilde = '~'
var fence = tilde + tilde
function strikethrough(node) {
return fence + this.all(node).join('') + fence
}

38
node_modules/remark-stringify/lib/visitors/emphasis.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
'use strict'
module.exports = emphasis
var underscore = '_'
var asterisk = '*'
// Stringify an `emphasis`.
//
// The marker used is configurable through `emphasis`, which defaults to an
// underscore (`'_'`) but also accepts an asterisk (`'*'`):
//
// ```markdown
// *foo*
// ```
//
// In `pedantic` mode, text which itself contains an underscore will cause the
// marker to default to an asterisk instead:
//
// ```markdown
// *foo_bar*
// ```
function emphasis(node) {
var marker = this.options.emphasis
var content = this.all(node).join('')
// When in pedantic mode, prevent using underscore as the marker when there
// are underscores in the content.
if (
this.options.pedantic &&
marker === underscore &&
content.indexOf(marker) !== -1
) {
marker = asterisk
}
return marker + content + marker
}

View File

@@ -0,0 +1,30 @@
'use strict'
var repeat = require('repeat-string')
var lineFeed = '\n'
var space = ' '
var colon = ':'
var leftSquareBracket = '['
var rightSquareBracket = ']'
var caret = '^'
var tabSize = 4
var blank = lineFeed + lineFeed
var indent = repeat(space, tabSize)
module.exports = footnoteDefinition
function footnoteDefinition(node) {
var content = this.all(node).join(blank + indent)
return (
leftSquareBracket +
caret +
(node.label || node.identifier) +
rightSquareBracket +
colon +
space +
content
)
}

View File

@@ -0,0 +1,16 @@
'use strict'
module.exports = footnoteReference
var leftSquareBracket = '['
var rightSquareBracket = ']'
var caret = '^'
function footnoteReference(node) {
return (
leftSquareBracket +
caret +
(node.label || node.identifier) +
rightSquareBracket
)
}

13
node_modules/remark-stringify/lib/visitors/footnote.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
'use strict'
module.exports = footnote
var leftSquareBracket = '['
var rightSquareBracket = ']'
var caret = '^'
function footnote(node) {
return (
leftSquareBracket + caret + this.all(node).join('') + rightSquareBracket
)
}

51
node_modules/remark-stringify/lib/visitors/heading.js generated vendored Normal file
View File

@@ -0,0 +1,51 @@
'use strict'
var repeat = require('repeat-string')
module.exports = heading
var lineFeed = '\n'
var space = ' '
var numberSign = '#'
var dash = '-'
var equalsTo = '='
// Stringify a heading.
//
// In `setext: true` mode and when `depth` is smaller than three, creates a
// setext header:
//
// ```markdown
// Foo
// ===
// ```
//
// Otherwise, an ATX header is generated:
//
// ```markdown
// ### Foo
// ```
//
// In `closeAtx: true` mode, the header is closed with hashes:
//
// ```markdown
// ### Foo ###
// ```
function heading(node) {
var self = this
var depth = node.depth
var setext = self.options.setext
var closeAtx = self.options.closeAtx
var content = self.all(node).join('')
var prefix
if (setext && depth < 3) {
return (
content + lineFeed + repeat(depth === 1 ? equalsTo : dash, content.length)
)
}
prefix = repeat(numberSign, node.depth)
return prefix + space + content + (closeAtx ? space + prefix : '')
}

7
node_modules/remark-stringify/lib/visitors/html.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
'use strict'
module.exports = html
function html(node) {
return node.value
}

View File

@@ -0,0 +1,19 @@
'use strict'
var label = require('../util/label')
module.exports = imageReference
var leftSquareBracket = '['
var rightSquareBracket = ']'
var exclamationMark = '!'
function imageReference(node) {
return (
exclamationMark +
leftSquareBracket +
(this.encode(node.alt, node) || '') +
rightSquareBracket +
label(node)
)
}

47
node_modules/remark-stringify/lib/visitors/image.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
'use strict'
var uri = require('../util/enclose-uri')
var title = require('../util/enclose-title')
module.exports = image
var space = ' '
var leftParenthesis = '('
var rightParenthesis = ')'
var leftSquareBracket = '['
var rightSquareBracket = ']'
var exclamationMark = '!'
// Stringify an image.
//
// Is smart about enclosing `url` (see `encloseURI()`) and `title` (see
// `encloseTitle()`).
//
// ```markdown
// ![foo](</fav icon.png> 'My "favourite" icon')
// ```
//
// Supports named entities in `url`, `alt`, and `title` when in
// `settings.encode` mode.
function image(node) {
var self = this
var content = uri(self.encode(node.url || '', node))
var exit = self.enterLink()
var alt = self.encode(self.escape(node.alt || '', node))
exit()
if (node.title) {
content += space + title(self.encode(node.title, node))
}
return (
exclamationMark +
leftSquareBracket +
alt +
rightSquareBracket +
leftParenthesis +
content +
rightParenthesis
)
}

View File

@@ -0,0 +1,41 @@
'use strict'
var streak = require('longest-streak')
var repeat = require('repeat-string')
module.exports = inlineCode
var space = ' '
var graveAccent = '`'
// Stringify inline code.
//
// Knows about internal ticks (`\``), and ensures one more tick is used to
// enclose the inline code:
//
// ````markdown
// ```foo ``bar`` baz```
// ````
//
// Even knows about inital and final ticks:
//
// ``markdown
// `` `foo ``
// `` foo` ``
// ```
function inlineCode(node) {
var value = node.value
var ticks = repeat(graveAccent, streak(value, graveAccent) + 1)
var start = ticks
var end = ticks
if (value.charAt(0) === graveAccent) {
start += space
}
if (value.charAt(value.length - 1) === graveAccent) {
end = space + end
}
return start + value + end
}

View File

@@ -0,0 +1,27 @@
'use strict'
var copy = require('../util/copy-identifier-encoding')
var label = require('../util/label')
module.exports = linkReference
var leftSquareBracket = '['
var rightSquareBracket = ']'
var shortcut = 'shortcut'
var collapsed = 'collapsed'
function linkReference(node) {
var self = this
var type = node.referenceType
var exit = self.enterLinkReference(self, node)
var value = self.all(node).join('')
exit()
if (type === shortcut || type === collapsed) {
value = copy(value, node.label || node.identifier)
}
return leftSquareBracket + value + rightSquareBracket + label(node)
}

65
node_modules/remark-stringify/lib/visitors/link.js generated vendored Normal file
View File

@@ -0,0 +1,65 @@
'use strict'
var uri = require('../util/enclose-uri')
var title = require('../util/enclose-title')
module.exports = link
var space = ' '
var leftSquareBracket = '['
var rightSquareBracket = ']'
var leftParenthesis = '('
var rightParenthesis = ')'
// Expression for a protocol:
// See <http://en.wikipedia.org/wiki/URI_scheme#Generic_syntax>.
var protocol = /^[a-z][a-z+.-]+:\/?/i
// Stringify a link.
//
// When no title exists, the compiled `children` equal `url`, and `url` starts
// with a protocol, an auto link is created:
//
// ```markdown
// <http://example.com>
// ```
//
// Otherwise, is smart about enclosing `url` (see `encloseURI()`) and `title`
// (see `encloseTitle()`).
// ```
//
// ```markdown
// [foo](<foo at bar dot com> 'An "example" e-mail')
// ```
//
// Supports named entities in the `url` and `title` when in `settings.encode`
// mode.
function link(node) {
var self = this
var content = self.encode(node.url || '', node)
var exit = self.enterLink()
var escaped = self.encode(self.escape(node.url || '', node))
var value = self.all(node).join('')
exit()
if (node.title == null && protocol.test(content) && escaped === value) {
// Backslash escapes do not work in autolinks, so we do not escape.
return uri(self.encode(node.url), true)
}
content = uri(content)
if (node.title) {
content += space + title(self.encode(self.escape(node.title, node), node))
}
return (
leftSquareBracket +
value +
rightSquareBracket +
leftParenthesis +
content +
rightParenthesis
)
}

View File

@@ -0,0 +1,75 @@
'use strict'
var repeat = require('repeat-string')
var pad = require('../util/pad')
module.exports = listItem
var lineFeed = '\n'
var space = ' '
var leftSquareBracket = '['
var rightSquareBracket = ']'
var lowercaseX = 'x'
var ceil = Math.ceil
var blank = lineFeed + lineFeed
var tabSize = 4
// Stringify a list item.
//
// Prefixes the content with a checked checkbox when `checked: true`:
//
// ```markdown
// [x] foo
// ```
//
// Prefixes the content with an unchecked checkbox when `checked: false`:
//
// ```markdown
// [ ] foo
// ```
function listItem(node, parent, position, bullet) {
var self = this
var style = self.options.listItemIndent
var marker = bullet || self.options.bullet
var spread = node.spread == null ? true : node.spread
var checked = node.checked
var children = node.children
var length = children.length
var values = []
var index = -1
var value
var indent
var spacing
while (++index < length) {
values[index] = self.visit(children[index], node)
}
value = values.join(spread ? blank : lineFeed)
if (typeof checked === 'boolean') {
// Note: Id like to be able to only add the space between the check and
// the value, but unfortunately github does not support empty list-items
// with a checkbox :(
value =
leftSquareBracket +
(checked ? lowercaseX : space) +
rightSquareBracket +
space +
value
}
if (style === '1' || (style === 'mixed' && value.indexOf(lineFeed) === -1)) {
indent = marker.length + 1
spacing = space
} else {
indent = ceil((marker.length + 1) / tabSize) * tabSize
spacing = repeat(space, indent - marker.length)
}
return value
? marker + spacing + pad(value, indent / tabSize).slice(indent)
: marker
}

8
node_modules/remark-stringify/lib/visitors/list.js generated vendored Normal file
View File

@@ -0,0 +1,8 @@
'use strict'
module.exports = list
function list(node) {
var fn = node.ordered ? this.visitOrderedItems : this.visitUnorderedItems
return fn.call(this, node)
}

View File

@@ -0,0 +1,7 @@
'use strict'
module.exports = paragraph
function paragraph(node) {
return this.all(node).join('')
}

11
node_modules/remark-stringify/lib/visitors/root.js generated vendored Normal file
View File

@@ -0,0 +1,11 @@
'use strict'
module.exports = root
var lineFeed = '\n'
// Stringify a root.
// Adds a final newline to ensure valid POSIX files. */
function root(node) {
return this.block(node) + lineFeed
}

18
node_modules/remark-stringify/lib/visitors/strong.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
'use strict'
var repeat = require('repeat-string')
module.exports = strong
// Stringify a `strong`.
//
// The marker used is configurable by `strong`, which defaults to an asterisk
// (`'*'`) but also accepts an underscore (`'_'`):
//
// ```markdown
// __foo__
// ```
function strong(node) {
var marker = repeat(this.options.strong, 2)
return marker + this.all(node).join('') + marker
}

View File

@@ -0,0 +1,7 @@
'use strict'
module.exports = tableCell
function tableCell(node) {
return this.all(node).join('')
}

68
node_modules/remark-stringify/lib/visitors/table.js generated vendored Normal file
View File

@@ -0,0 +1,68 @@
'use strict'
var markdownTable = require('markdown-table')
module.exports = table
var space = ' '
var verticalBar = '|'
// Stringify table.
//
// Creates a fenced table by default, but not in `looseTable: true` mode:
//
// ```markdown
// Foo | Bar
// :-: | ---
// Baz | Qux
//
// NOTE: Be careful with `looseTable: true` mode, as a loose table inside an
// indented code block on GitHub renders as an actual table!
//
// Creates a spaced table by default, but not in `spacedTable: false`:
//
// ```markdown
// |Foo|Bar|
// |:-:|---|
// |Baz|Qux|
// ```
function table(node) {
var self = this
var options = self.options
var loose = options.looseTable
var spaced = options.spacedTable
var pad = options.paddedTable
var stringLength = options.stringLength
var rows = node.children
var index = rows.length
var exit = self.enterTable()
var result = []
var start
var end
while (index--) {
result[index] = self.all(rows[index])
}
exit()
if (loose) {
start = ''
end = ''
} else if (spaced) {
start = verticalBar + space
end = space + verticalBar
} else {
start = verticalBar
end = verticalBar
}
return markdownTable(result, {
align: node.align,
pad: pad,
start: start,
end: end,
stringLength: stringLength,
delimiter: spaced ? space + verticalBar + space : verticalBar
})
}

19
node_modules/remark-stringify/lib/visitors/text.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
'use strict'
module.exports = text
// Stringify text.
// Supports named entities in `settings.encode: true` mode:
//
// ```markdown
// AT&amp;T
// ```
//
// Supports numbered entities in `settings.encode: numbers` mode:
//
// ```markdown
// AT&#x26;T
// ```
function text(node, parent) {
return this.encode(this.escape(node.value, node, parent), node)
}

View File

@@ -0,0 +1,31 @@
'use strict'
var repeat = require('repeat-string')
module.exports = thematic
var space = ' '
// Stringify a `thematic-break`.
// The character used is configurable through `rule`: (`'_'`):
//
// ```markdown
// ___
// ```
//
// The number of repititions is defined through `ruleRepetition` (`6`):
//
// ```markdown
// ******
// ```
//
// Whether spaces delimit each character, is configured through `ruleSpaces`
// (`true`):
// ```markdown
// * * *
// ```
function thematic() {
var options = this.options
var rule = repeat(options.rule, options.ruleRepetition)
return options.ruleSpaces ? rule.split('').join(space) : rule
}