diff --git a/djhtml/modes.py b/djhtml/modes.py
index 02a7744..9b9e655 100644
--- a/djhtml/modes.py
+++ b/djhtml/modes.py
@@ -385,10 +385,10 @@ class DjJS(DjTXT):
r"//.*",
r"/\*",
r"[$\w-]+:",
- r'"(?:\\.|[^\\"])*"', # "string"
- r"'(?:\\.|[^\\'])*'", # 'string'
- r"`(?:\\.|[^\\`])*`", # `string`
- r"/(?:\\.|[^\\/ \n])*/", # /string/ (but without spaces)
+ r'"(?:\\.|[^"])*"', # "string"
+ r"'(?:\\.|[^'])*'", # 'string'
+ r"`(?:\\.|[^`])*`", # `string`
+ r"/(?=[^ ])(?:\\.|[^/\n])*/", # /[^ ]string/
r"[{[()\]}]",
r"var ",
r"let ",
diff --git a/setup.cfg b/setup.cfg
index 2f1049d..73a41d8 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = djhtml
-version = 3.0.5
+version = 3.0.6
description = Django/Jinja template indenter
long_description = file: README.md
long_description_content_type = text/markdown
diff --git a/tests/suite/js.html b/tests/suite/js.html
index 74c3650..c8f0c6a 100644
--- a/tests/suite/js.html
+++ b/tests/suite/js.html
@@ -455,9 +455,9 @@
foo = /([{/
bar = /\/{/
baz = //{//
+ xizzy = /{/
- // The following is known to be broken
+ // The following is no longer broken \o/
/function() {/
- return
- }
+ return
diff --git a/tests/suite/js.tokens b/tests/suite/js.tokens
index b88effa..783a19d 100644
--- a/tests/suite/js.tokens
+++ b/tests/suite/js.tokens
@@ -433,7 +433,7 @@ Line([Open('