Fix component name regex to support : and / in paths
The dep scanner regex only matched [a-zA-Z0-9_-] in component names, missing the new path separators (/) and namespace delimiters (:). Fixed in deps.sx spec + rebootstrapped sx_ref.py and sx-browser.js. Also fixed the Python fallback in deps.py. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -126,7 +126,7 @@ def _compute_all_io_refs_fallback(
|
||||
|
||||
def _scan_components_from_sx_fallback(source: str) -> set[str]:
|
||||
import re
|
||||
return {f"~{m}" for m in re.findall(r'\(~([a-zA-Z_][a-zA-Z0-9_\-]*)', source)}
|
||||
return {f"~{m}" for m in re.findall(r'\(~([a-zA-Z_][a-zA-Z0-9_\-:/]*)', source)}
|
||||
|
||||
|
||||
def _components_needed_fallback(page_sx: str, env: dict[str, Any]) -> set[str]:
|
||||
|
||||
Reference in New Issue
Block a user