release: WRNexusJS 0.2.35

This commit is contained in:
2026-07-15 08:57:07 +05:30
parent 2c6e6f6de3
commit afb14c2fbf
55 changed files with 160 additions and 89 deletions
+24 -5
View File
@@ -526,18 +526,37 @@ export function parseHtmlView(src: string, pos: number): { nodes: ViewNode[]; en
};
const readAttributeName = (): string => {
const first = src[i];
if (i >= src.length || (!isNameStart(first!) && first !== ":" && first !== "$")) {
if (i >= src.length) {
return fail("Expected an attribute name");
}
const start = i++;
const start = i;
while (i < src.length) {
const char = src[i];
const next = src[i + 1];
if (
char === "=" ||
char === ">" ||
char === '"' ||
char === "'" ||
char === " " ||
char === "\t" ||
char === "\n" ||
char === "\r" ||
(char === "/" && next === ">")
) {
break;
}
while (i < src.length && isAttributeNamePart(src[i]!, src[i + 1])) {
i++;
}
if (i === start) {
return fail("Expected an attribute name");
}
return src.slice(start, i);
};