1
0
mirror of https://github.com/cmur2/joe-syntax.git synced 2025-08-31 05:13:04 +02:00

New highlighter for Ruby's ERB and HTML embedded ERB

Ruby code inside ERB tags (whether in plain or HTML environment) is highlighted
via the ruby.jsf colorer.
This commit is contained in:
cn
2011-10-04 21:26:20 +02:00
parent 4d138ffec2
commit 09bdf55037
5 changed files with 74 additions and 1 deletions

View File

@@ -27,11 +27,13 @@
# Detect pod
:idle Idle
* rest noeat
* NULL noeat call=.ruby()
"=" pod_start
# Rest of line
.subr ruby
:rest Idle
* rest
"#" line_comment recolor=-1
@@ -59,7 +61,16 @@
:after_term Idle
* rest noeat
" \t)" after_term
.ifdef erb
"/" rest
"%" after_term_erb_end
.else
"/%" rest
.endif
:after_term_erb_end Idle
* rest noeat
">" NULL recolor=-2 return
:pod_start Idle
* pod_start
@@ -430,6 +441,9 @@ done
* match noeat
" \t" after_term noeat
"xrqQw" match
.ifdef erb
">" NULL recolor=-2 return
.endif
:match Idle
* inmatch save_c recolor=-1
@@ -539,6 +553,8 @@ done
* rest noeat
"a-zA-Z0-9_" global_var
.end
.subr comment_todo
# initial state
:comment_todo_init Comment