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:
@@ -14,7 +14,7 @@
|
||||
// =========================================================================
|
||||
|
||||
var NIL = Object.freeze({ _nil: true, toString: function() { return "nil"; } });
|
||||
var SX_VERSION = "2026-03-12T18:28:35Z";
|
||||
var SX_VERSION = "2026-03-12T22:27:08Z";
|
||||
|
||||
function isNil(x) { return x === NIL || x === null || x === undefined; }
|
||||
function isSxTruthy(x) { return x !== false && !isNil(x); }
|
||||
@@ -3409,7 +3409,7 @@ callExpr.push(dictGet(kwargs, k)); } }
|
||||
|
||||
// scan-components-from-source
|
||||
var scanComponentsFromSource = function(source) { return (function() {
|
||||
var matches = regexFindAll("\\(~([a-zA-Z_][a-zA-Z0-9_\\-]*)", source);
|
||||
var matches = regexFindAll("\\(~([a-zA-Z_][a-zA-Z0-9_\\-:/]*)", source);
|
||||
return map(function(m) { return (String("~") + String(m)); }, matches);
|
||||
})(); };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user