File tree Expand file tree Collapse file tree 3 files changed +20
-8
lines changed Expand file tree Collapse file tree 3 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -988,7 +988,7 @@ this ^ lineup"
988988 " Build a regular expression for the end of a heredoc started by the string HEREDOC-START."
989989 ; ; Extract just the identifier without <<< and quotes.
990990 (string-match " \\ _<.+?\\ _>" heredoc-start)
991- (concat " ^\\ (" (match-string 0 heredoc-start) " \\ )\\ W" ))
991+ (concat " ^\\ s-* \\ (" (match-string 0 heredoc-start) " \\ )\\ W" ))
992992
993993(defun php-syntax-propertize-function (start end )
994994 " Apply propertize rules from START to END."
@@ -1000,12 +1000,7 @@ this ^ lineup"
10001000 (while (re-search-forward " ['\" ]" end t )
10011001 (when (php-in-comment-p)
10021002 (c-put-char-property (match-beginning 0 )
1003- 'syntax-table (string-to-syntax " _" ))))
1004- (funcall
1005- (syntax-propertize-rules
1006- (" \\ (\" \\ )\\ (\\\\ .\\ |[^\"\n \\ ]\\ )*\\ (\" \\ )" (1 " \" " ) (3 " \" " ))
1007- (" \\ ('\\ )\\ (\\\\ .\\ |[^'\n \\ ]\\ )*\\ ('\\ )" (1 " \" " ) (3 " \" " )))
1008- start end))
1003+ 'syntax-table (string-to-syntax " _" )))))
10091004
10101005(defun php-heredoc-syntax ()
10111006 " Mark the boundaries of searched heredoc."
Original file line number Diff line number Diff line change 3131$ g = <<<"いろは"
3232Let'go Justin
3333いろは ;
34+
35+ var_dump (<<<"ABC"
36+ Let'go Justin
37+ ABC );
38+
39+ if (1 === 1 ) {
40+ var_dump (<<<"ABC"
41+ Let'go Justin
42+ ABC );
43+ }
Original file line number Diff line number Diff line change 3939 (" g" . php-variable-name)
4040 (" = " )
4141 (" <<<\" いろは\"\n Let'go Justin\n いろは" . php-string)
42- (" ;\n " ))
42+ (" ;\n\n var_dump(" )
43+ (" <<<\" ABC\"\n Let'go Justin\n ABC" . php-string)
44+ (" );\n\n " )
45+ (" if" . php-keyword)
46+ (" (1 === 1) {\n var_dump(" )
47+ (" <<<\" ABC\"\n Let'go Justin\n ABC" . php-string)
48+ (" );\n }\n " )
49+ )
You can’t perform that action at this time.
0 commit comments