Browse Source

Call js.js(php) instead of js.js(html) when using html(php)

Mostly copied from css(php),
pull/3/head
cn 8 years ago
parent
commit
909d325468
2 changed files with 18 additions and 3 deletions
  1. +1
    -1
      html.jsf
  2. +17
    -2
      js.jsf

+ 1
- 1
html.jsf View File

@@ -172,7 +172,7 @@ done

:stag_end TagEdge
.ifdef php
* tag_begin call=php.php(script)
* tag_begin call=js.js(php)
.else
* tag_begin call=js.js(html)
.endif


+ 17
- 2
js.jsf View File

@@ -21,6 +21,9 @@
=Methods
=Number cyan #fg_520 # orange

# from html.jsf to support <?php?>
=TagEdge green

:begin Idle
* begin noeat call=.js()

@@ -39,10 +42,15 @@
"{}" brace recolor=-1
.ifdef html
",:;=()>[]*&|!?~+\-%^" control recolor=-1
"<" maybe_done
"<" maybe_done recolor=-1
.else
.ifdef php
",:;=()>[]*&|!?~+\-%^" control recolor=-1
"<" maybe_done recolor=-1
.else
",:;=()><[]*&|!?~+\-%^" control recolor=-1
.endif
.endif

# / / regex not allowed after terms
# class Control to handle ')' right
@@ -52,9 +60,16 @@
"%" control recolor=-1
"/" after_term_slash

:maybe_done Control
:maybe_done TagEdge
* idle noeat
"/" idle noeat return recolor=-2
.ifdef php
"?%" rtn_php call=php.php()
.endif

# this state allows php and perl to recolor the ?> %> or &> properly.
:rtn_php TagEdge
* idle noeat

:brace Brace
* idle noeat


Loading…
Cancel
Save