From b0cb51367d8c68eabafaa57c2967587007aa79bd Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 20 Mar 2023 21:20:21 +0900 Subject: feat(nuldoc): support XML comments --- nuldoc-src/xml.ts | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/nuldoc-src/xml.ts b/nuldoc-src/xml.ts index f07161f..13ec5d6 100644 --- a/nuldoc-src/xml.ts +++ b/nuldoc-src/xml.ts @@ -56,12 +56,19 @@ function parseChildNodes(p: Parser): Node[] { const nodes = []; while (true) { const c = peek(p); - const c2 = peek2(p); + const c2 = peekN(p, 2); + const c3 = peekN(p, 3); if (c === "<") { if (c2 === "/") { break; } else if (c2 === "!") { - nodes.push(parseCdata(p)); + if (c3 === "[") { + // "); + next(p, "-->".length); +} + function formatCdata(s: string): string { //