From c503bc13134461caef33f33f971702ce7cb89758 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Mon, 21 Aug 2023 19:25:22 +0200 Subject: [PATCH] html: Add forgotten re test --- format/xml/html.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/format/xml/html.go b/format/xml/html.go index 2bb222ac..4193f0d6 100644 --- a/format/xml/html.go +++ b/format/xml/html.go @@ -196,7 +196,7 @@ func fromHTMLToArray(n *html.Node) any { return f(n) } -var htmlMagicRe = &lazyre.RE{S: `` + +var htmlMagicRE = &lazyre.RE{S: `` + `^` + // anchor to start `(?i)` + // case insensitive `[[:graph:][:space:]]{0,64}?` + // 0-64 non-control ASCII lazily to allow comment etc @@ -214,7 +214,7 @@ func decodeHTML(d *decode.D) any { if d.ArgAs(&pi) { // if probing the input has to start with " or found") } }