diff --git a/html.jsf b/html.jsf
index b8970cd..180ca54 100644
--- a/html.jsf
+++ b/html.jsf
@@ -174,7 +174,7 @@ done
.ifdef php
* tag_begin call=php.php(script)
.else
- * tag_begin call=java.java(script)
+ * tag_begin call=js.js(html)
.endif
:stag_done TagEdge
diff --git a/java.jsf b/java.jsf
index 218b22b..7b49ecd 100644
--- a/java.jsf
+++ b/java.jsf
@@ -37,12 +37,7 @@
"'" char recolor=-1
"a-zA-Z_" ident mark buffer
"{}" brace recolor=-1
-.ifdef script
- ",:;=()>[]*&|!~+\-%^" control recolor=-1
- "<" maybe_done
-.else
",:;=()><[]*&|!~+\-%^" control recolor=-1
-.endif
:maybe_done Control
* idle noeat
diff --git a/js.jsf b/js.jsf
index 48866cf..76b6d01 100644
--- a/js.jsf
+++ b/js.jsf
@@ -21,6 +21,11 @@
=Methods
=Number cyan #fg_520 # orange
+:begin Idle
+ * begin noeat call=.js()
+
+.subr js
+
:idle Idle
* idle
"\n" idle
@@ -32,7 +37,12 @@
"'" char recolor=-1
"a-zA-Z_" ident mark buffer
"{}" brace recolor=-1
- ",:;=()><[]*&|!?~+\-%^" control recolor=-1
+.ifdef html
+ ",:;=()>[]*&|!?~+\-%^" control recolor=-1
+ "<" maybe_done
+.else
+ ",:;=()><[]*&|!?~+\-%^" control recolor=-1
+.endif
# / / regex not allowed after terms
# class Control to handle ')' right
@@ -42,6 +52,10 @@
"%" control recolor=-1
"/" after_term_slash
+:maybe_done Control
+ * idle noeat
+ "/" idle noeat return recolor=-2
+
:brace Brace
* idle noeat
@@ -259,6 +273,8 @@ done
:method_end Methods
* idle noeat
+.end
+
.subr comment_todo
# initial state
:comment_todo_init Comment