Skip to content

Commit

Permalink
Prevent highlighting of :filter blocks inside other :filter blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Nov 23, 2012
1 parent ad1085d commit 16d4a5c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions haml-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ respectively."
FN is passed a pair of points representing the beginning and end
of the filtered text."
(when (re-search-forward (haml-nested-regexp (concat ":" filter-name-re))
limit t)
(when (and
(not (get-text-property (point) 'filter))
(re-search-forward (haml-nested-regexp (concat ":" filter-name-re))
limit t))
;; fontify the filter name
(put-text-property (match-beginning 2) (1+ (match-end 2))
'font-lock-face font-lock-preprocessor-face)
Expand Down

0 comments on commit 16d4a5c

Please sign in to comment.