branch: elpa/jade-mode
commit 216d1f5148ac250082d5d75cbb014d9d669bfef3
Author: Travis Jefferson <[email protected]>
Commit: Travis Jefferson <[email protected]>
use mc's mixin regex to highlight mixin syntax
* looks like it was still getting caught in the tag regex
---
example.jade | 3 ++-
jade-mode.el | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/example.jade b/example.jade
index 1795a304e0..c4b5d9e37e 100644
--- a/example.jade
+++ b/example.jade
@@ -28,7 +28,8 @@ html(lang="en", class = ['classOne', 'classTwo'].join(','))
span this one shouldn't higlight strings or... .other #things if else
| this one shouldn't highlight strings, and the same goes for
.keywords #ok ?
div#paren.content.example(style = 'float: left;') Content .here
#should be plain if for
- +help("if this is .bolded #that's bad, we want a string","a second arg
or else");
+ +helpMe("if this is .bolded #that's bad, we want a string","a second
arg or else");
+ //- +mixIn('do not highlight mixins in comment blocks')
div.examples#javascript
- var a = 1;
- var helperFunction = function (a) { return (a === 1 ? 'singular' :
'plural'); };
diff --git a/jade-mode.el b/jade-mode.el
index 69505357fe..928f2648d4 100644
--- a/jade-mode.el
+++ b/jade-mode.el
@@ -89,8 +89,9 @@
(,jade-keywords . font-lock-keyword-face) ;; keywords
(,jade-id-re . font-lock-variable-name-face) ;; id
(,jade-class-re . font-lock-type-face) ;; class name
- ("\\(-?//.*\\)" 1 font-lock-comment-face t) ;; jade block comments
(,jade-tag-re . font-lock-function-name-face)
+ (,jade-mixin-re 0 font-lock-constant-face t)
+ ("\\(-?//.*\\)" 1 font-lock-comment-face t) ;; jade block comments
;; tag name
;; remove highlighting from literal content following tag/class/id