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

53
node_modules/mdast-util-gfm-table/from-markdown.js generated vendored Normal file
View File

@@ -0,0 +1,53 @@
exports.enter = {
table: enterTable,
tableData: enterCell,
tableHeader: enterCell,
tableRow: enterRow
}
exports.exit = {
codeText: exitCodeText,
table: exitTable,
tableData: exit,
tableHeader: exit,
tableRow: exit
}
function enterTable(token) {
this.enter({type: 'table', align: token._align, children: []}, token)
this.setData('inTable', true)
}
function exitTable(token) {
this.exit(token)
this.setData('inTable')
}
function enterRow(token) {
this.enter({type: 'tableRow', children: []}, token)
}
function exit(token) {
this.exit(token)
}
function enterCell(token) {
this.enter({type: 'tableCell', children: []}, token)
}
// Overwrite the default code text data handler to unescape escaped pipes when
// they are in tables.
function exitCodeText(token) {
var value = this.resume()
if (this.getData('inTable')) {
value = value.replace(/\\([\\|])/g, replace)
}
this.stack[this.stack.length - 1].value = value
this.exit(token)
}
function replace($0, $1) {
// Pipes work, backslashes dont (but cant escape pipes).
return $1 === '|' ? $1 : $0
}