feat(okf-hub): Fase F — converter fence-aware (path-style/acentos/pipe escapado) + validador fence-aware

This commit is contained in:
2026-06-28 22:39:23 +01:00
parent 0094b45bcf
commit 3752238699
4 changed files with 233 additions and 107 deletions
+8 -1
View File
@@ -213,7 +213,14 @@ validate_file() {
# Check for wikilinks in body (wiki layer)
if echo "$content" | grep -q '^layer: wiki'; then
local body
body="$(sed -n '/^---$/,/^---$/d; p' "$f")"
body="$(awk '
NR==1 && $0=="---" {infm=1; next}
infm && $0=="---" {infm=0; next}
infm {next}
/^[[:space:]]*```/ || /^[[:space:]]*~~~/ {infence=!infence; next}
infence {next}
{gsub(/`[^`]*`/,""); print}
' "$f")"
if echo "$body" | grep -q '\[\['; then
echo -e "${YEL}WARN${NC} $rel [wiki]: contains wikilinks [[ ]] — convert to [text](path)"
((WARNINGS++)) || true