Skip to content

Commit

Permalink
Don't highlight string delimiters inside comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hinrik committed Oct 6, 2015
1 parent 564cbfa commit c5f3d07
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion perl6-font-lock.el
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,12 @@ LIMIT can be used to bound the search."
(defun perl6-match-metaoperator (limit)
(perl6-match-property 'perl6-metaoperator nil limit))

(defun perl6-match-string-delimiter (limit)
(perl6-search-when
(perl6-rx (or (syntax string-quote) (syntax string-delimiter)))
(lambda () (not (eq (perl6-syntax-context) `comment)))
limit))

(defconst perl6-font-lock-keywords
`(
;; (-) R=> [*] X~ »+«
Expand Down Expand Up @@ -640,7 +646,7 @@ LIMIT can be used to bound the search."
(2 'perl6-number-addition)
(3 'perl6-number))
;; highlight string delimiters as operators
(,(perl6-rx (or (syntax string-quote) (syntax string-delimiter)))
(perl6-match-string-delimiter
0 'perl6-operator t))
"Font lock keywords for Perl 6.")

Expand Down

0 comments on commit c5f3d07

Please sign in to comment.