Skip to content

Commit

Permalink
Update mustache-mode and mustache.vim with hats
Browse files Browse the repository at this point in the history
  • Loading branch information
defunkt committed Mar 30, 2010
1 parent 349d144 commit 5b57d9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion contrib/mustache-mode.el
Expand Up @@ -75,7 +75,7 @@

;; Constant regular expressions to identify template elements.
(defconst tpl-mode-tpl-token "[a-zA-Z_][a-zA-Z0-9_:=\?!-]*?")
(defconst tpl-mode-section (concat "\\({{[#/]\s*"
(defconst tpl-mode-section (concat "\\({{[#^/]\s*"
tpl-mode-tpl-token
"\s*}}\\)"))
(defconst tpl-mode-open-section (concat "\\({{#\s*"
Expand Down
12 changes: 6 additions & 6 deletions contrib/mustache.vim
Expand Up @@ -4,10 +4,10 @@
" Screenshot: http://imgur.com/6F408
" Version: 1
" Last Change: 2009 Oct 15
" Remark:
" It lexically hilights embedded mustaches (exclusively) in html file.
" Remark:
" It lexically hilights embedded mustaches (exclusively) in html file.
" While it was written for Ruby-based Mustache template system, it should work for Google's C-based *ctemplate* as well as Erlang-based *et*. All of them are, AFAIK, based on the idea of ctemplate.
" References:
" References:
" [Mustache](http://github.com/defunkt/mustache)
" [ctemplate](http://code.google.com/p/google-ctemplate/)
" [ctemplate doc](http://google-ctemplate.googlecode.com/svn/trunk/doc/howto.html)
Expand Down Expand Up @@ -37,10 +37,10 @@ else
endif

syntax match mustacheError '}}}\?'
syntax match mustacheInsideError '{{[{#<>=!\/]\?' containedin=@mustacheInside
syntax region mustacheVariable matchgroup=mustacheMarker start=/{{/ end=/}}/ containedin=@htmlMustacheContainer
syntax match mustacheInsideError '{{[{#^<>=!\/]\?' containedin=@mustacheInside
syntax region mustacheVariable matchgroup=mustacheMarker start=/{{/ end=/}}/ containedin=@htmlMustacheContainer
syntax region mustacheVariableUnescape matchgroup=mustacheMarker start=/{{{/ end=/}}}/ containedin=@htmlMustacheContainer
syntax region mustacheSection matchgroup=mustacheMarker start='{{[#/]' end=/}}/ containedin=@htmlMustacheContainer
syntax region mustacheSection matchgroup=mustacheMarker start='{{[#^/]' end=/}}/ containedin=@htmlMustacheContainer
syntax region mustachePartial matchgroup=mustacheMarker start=/{{[<>]/ end=/}}/
syntax region mustacheMarkerSet matchgroup=mustacheMarker start=/{{=/ end=/=}}/
syntax region mustacheComment start=/{{!/ end=/}}/ contains=Todo containedin=htmlHead
Expand Down

0 comments on commit 5b57d9f

Please sign in to comment.