fix(javascript): recognize digits in artifact URI schemes (#1045)

This commit is contained in:
Alex
2026-10-08 12:28:34 +08:00
committed by GitHub
parent 6b55de017b
commit 03424ae91e
4 changed files with 47 additions and 1 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
/** Whether a reference carries a URI scheme (`https:`, `file:`, …). */
export const hasScheme = (value: string): boolean =>
/^[A-Za-z][A-Za-z+.-]*:/u.test(value);
/^[A-Za-z][A-Za-z0-9+.-]*:/u.test(value);
/** Whether a reference is scheme-qualified or protocol-relative. */
export const looksExternal = (value: string): boolean =>