fix: keep MEDIA tokens with punctuation and log web media failures
This commit is contained in:
1 parent
865abcf1f5
commit
8ea7f9b439
2 files changed
+53
-12
No files matched your search
+2
-1
@@ -1,7 +1,8 @@
|
||||
// Shared helpers for parsing MEDIA tokens from command/stdout text.
|
||||
|
||||
export const MEDIA_LINE_RE = /\bMEDIA:/i;
|
||||
export const MEDIA_TOKEN_RE = /\bMEDIA:\s*([^\s]+)/i;
|
||||
// Allow optional wrapping backticks and punctuation after the token; capture the core token.
|
||||
export const MEDIA_TOKEN_RE = /\bMEDIA:\s*`?([^\s`]+)`?/i;
|
||||
|
||||
export function normalizeMediaSource(src: string) {
|
||||
if (src.startsWith("file://")) return src.replace("file://", "");
|
||||
|
||||
Reference in new issue
Block a user