Aktueller Stand

This commit is contained in:
2026-01-22 19:05:45 +01:00
parent 85dee61a4d
commit e280e4eadb
1967 changed files with 397327 additions and 74093 deletions

View File

@@ -5,12 +5,14 @@ const types = parse.types
function safeRegex (re, opts) {
if (!opts) opts = {}
/* c8 ignore next */
const replimit = opts.limit === undefined ? 25 : opts.limit
/* c8 ignore next 2 */
if (isRegExp(re)) re = re.source
else if (typeof re !== 'string') re = String(re)
try { re = parse(re) } catch (err) { return false }
try { re = parse(re) } catch { return false }
let reps = 0
return (function walk (node, starHeight) {
@@ -31,7 +33,7 @@ function safeRegex (re, opts) {
if (!ok) return false
}
}
const stack = node.stack || (node.value && node.value.stack)
const stack = node.stack || node.value?.stack
if (!stack) return true
for (i = 0; i < stack.length; i++) {