Skip to content

Commit 9757df9

Browse files
danielmartintaku0
authored andcommitted
Improve regular expression to avoid false positives
1 parent cb6186e commit 9757df9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swift-mode-font-lock.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ Excludes true, false, and keywords begin with a number sign.")
667667
'swift-mode:property-access-face)
668668

669669
;; Make negation chars easier to see
670-
("\\(?:^\\|[^[:alnum:]_]\\)\\(!+\\)[^=]"
670+
("\\(?:^\\|\\s-\\|\\s(\\|\\s>\\|[,:;]\\)\\(!+\\)[^=]"
671671
1
672672
'swift-mode:negation-char-face))
673673
"Swift mode keywords for Font Lock.")

0 commit comments

Comments
 (0)