Skip to content

Commit 2a759c4

Browse files
simonwclaude
andcommitted
Fix invalid escape sequence SyntaxWarning in bridge script
The JavaScript regex /^Script error\.?$/ lives inside a non-raw Python string, so \. triggered a SyntaxWarning. Doubling the backslash emits the identical regex to the browser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d3b451f commit 2a759c4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎datasette_apps/rendering.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def iframe_bridge_script(channel_token=None, debug=False):
367367
if (event.message && !details.message) {
368368
details.message = String(event.message);
369369
}
370-
if (!event.error && /^Script error\.?$/.test(details.message || "")) {
370+
if (!event.error && /^Script error\\.?$/.test(details.message || "")) {
371371
// WebKit withholds uncaught-error details in sandboxed (opaque
372372
// origin) frames. Annotate so readers know why, and which
373373
// channels still carry full details.

0 commit comments

Comments
 (0)