Tokenize open disclosure attributes
test / test (pull_request) Successful in 6s

Authored-By: Codex (GPT-5) <noreply@openai.com>
This commit is contained in:
2026-08-27 17:48:43 +00:00
parent b8580d2082
commit 79d6ba5be9
3 changed files with 10 additions and 3 deletions
+3 -1
View File
@@ -55,9 +55,11 @@ VISIBLE_BODY=$(printf '%s\n' "${RENDERED_BODY}" |
if (char == ">") {
lower=tolower(tag)
if (lower ~ /^<details([[:space:]>])/) {
attributes=lower
gsub(/"[^"]*"/, "", attributes)
parent_hidden=(details_depth > 0 && hidden[details_depth])
details_depth++
hidden[details_depth]=(parent_hidden || lower !~ /[[:space:]]open([[:space:]=>]|$)/)
hidden[details_depth]=(parent_hidden || attributes !~ /[[:space:]]open([[:space:]=>]|$)/)
}
else if (lower ~ /^<\/details([[:space:]>])/) {
if (details_depth > 0) {