rhtml
rhtml copied to clipboard
[Feature] Add basically highlight support for {{ anything }}
What I know about Frontend template all use this.
here some example stolen from handlebars-mode.el:
;; Constant regular expressions to identify template elements.
(defconst handlebars-mode-handlebars-token "\\([a-zA-Z_.][a-zA-Z0-9_:=\?!.-]*\s+\\)*[a-zA-Z_.][a-zA-Z0-9_:=\?!.-]*")
(defconst handlebars-mode-section (concat "\\({{[#^/]\s*"
handlebars-mode-handlebars-token
"\s*}}\\)"))
Thanks.
a example:
{{edit-todo class="edit" value=title focus-out="acceptChanges" insert-newline="acceptChanges"}}