File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -596,6 +596,15 @@ style from Drupal."
596
596
(should (eq (get-text-property (1- (match-end 0 )) 'face )
597
597
'php-annotations-annotation-face ))))
598
598
599
+ (ert-deftest php-mode-test-issue-305 ()
600
+ " Test highlighting variables which contains 'this' or 'that'."
601
+ (with-php-mode-test (" issue-305.php" )
602
+ (search-forward " Start:" )
603
+ (search-forward " $this" )
604
+ (should-not (eq 'font-lock-constant-face (get-text-property (- (point ) 1 ) 'face )))
605
+ (search-forward " $that" )
606
+ (should-not (eq 'font-lock-constant-face (get-text-property (- (point ) 1 ) 'face )))))
607
+
599
608
; ;; php-mode-test.el ends here
600
609
601
610
; ; Local Variables:
Original file line number Diff line number Diff line change @@ -1328,7 +1328,7 @@ a completion list."
1328
1328
(" ->\\ (\\ sw+\\ )\\ s-*(" 1 'default )
1329
1329
1330
1330
; ; Highlight special variables
1331
- (" \\ $\\ (this\\ |that\\ )" 1 font-lock-constant-face )
1331
+ (" \\ $\\ (this\\ |that\\ )\\ _> " 1 font-lock-constant-face )
1332
1332
(" \\ (\\ $\\ |->\\ )\\ ([a-zA-Z0-9_]+\\ )" 2 font-lock-variable-name-face )
1333
1333
1334
1334
; ; Highlight function/method names
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /**
4
+ * GitHub Issue: https://github.com/ejmr/php-mode/issues/305
5
+ *
6
+ * Test highighting of $this_foo, $that_foo
7
+ */
8
+
9
+ // Start:
10
+ $ this_foo ;
11
+ $ that_foo ;
You can’t perform that action at this time.
0 commit comments