gitea push

This commit is contained in:
2026-05-09 12:19:29 -06:00
parent 06113c95b8
commit 429461e985
1481 changed files with 74306 additions and 52475 deletions
+5 -3
View File
@@ -142,7 +142,7 @@ function doubleQuotedValue(source, onError) {
next = source[++i + 1];
}
else if (next === 'x' || next === 'u' || next === 'U') {
const length = { x: 2, u: 4, U: 8 }[next];
const length = next === 'x' ? 2 : next === 'u' ? 4 : 8;
res += parseCharCode(source, i + 1, length, onError);
i += length;
}
@@ -212,12 +212,14 @@ function parseCharCode(source, offset, length, onError) {
const cc = source.substr(offset, length);
const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
const code = ok ? parseInt(cc, 16) : NaN;
if (isNaN(code)) {
try {
return String.fromCodePoint(code);
}
catch {
const raw = source.substr(offset - 2, length + 2);
onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);
return raw;
}
return String.fromCodePoint(code);
}
export { resolveFlowScalar };