diff --git a/gitgalaxy/standards/language_standards.py b/gitgalaxy/standards/language_standards.py index 1e882191..e3b57ff7 100644 --- a/gitgalaxy/standards/language_standards.py +++ b/gitgalaxy/standards/language_standards.py @@ -4767,8 +4767,13 @@ class PrismConfigSchema(TypedDict): # --- PHASE 1: LOGIC TOPOLOGY & STRUCTURE --- # 1. branch (Control Flow / Branching) # User-driven branching and declarative framework conditionals. + # BUG FIX: `*ngIf` was inside the shared `\b(...)"[^"]*"` group. + # `*` is a non-word char always preceded by whitespace in real + # markup (`
`) -- a `\b` between two non-word + # characters can never fire, so Angular's structural directive + # never matched. Pulled out with no leading `\b` (self-delimiting). "branch": re.compile( - r'<(?:details|summary|noscript)\b|\b(?:v-if|ng-if|\*ngIf|x-if|hx-swap)="[^"]*"|\{%\s*(?:if|elif|else|endif)\s*[^%]*%\}|\{\{#if\s+[^}]+\}\}', + r'<(?:details|summary|noscript)\b|\b(?:v-if|ng-if|x-if|hx-swap)="[^"]*"|\*ngIf="[^"]*"|\{%\s*(?:if|elif|else|endif)\s*[^%]*%\}|\{\{#if\s+[^}]+\}\}', re.I, ), # 2. args (Parameters / Coupling) @@ -4794,8 +4799,16 @@ class PrismConfigSchema(TypedDict): # --- PHASE 2: RISK ENGINE (Structural Integrity & Debt) --- # 6. safety (Defensive Programming / Validation) # Browser security and validation constraints. + # BUG FIX: `pattern="..."`/`sandbox="..."`/`rel="noopener..."`/ + # `integrity="..."` were inside the shared `\b(...)\b` group. + # Each ends on a literal `"`, and the char immediately after a + # closing attribute quote (a space or `>`) is also non-word -- + # `\b` between two non-word characters can never fire, so all + # four never matched. Pulled out with no trailing `\b` + # (self-delimiting on the closing quote). "safety": re.compile( - r'\b(?:required|readonly|disabled|pattern="[^"]*"|sandbox="[^"]*"|rel="noopener(?: noreferrer)?"|integrity="[^"]*")\b|