File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1013,14 +1013,17 @@ this ^ lineup"
10131013(defun php-syntax-propertize-hash-line-comment (_start end )
10141014 " Apply propertize # comment (without PHP8 Attributes) from START to END."
10151015 (unless php-mode-use-php7-syntax-table
1016- (while (< (point ) (min end (point-max )))
1017- (let ((line-end (line-end-position )))
1016+ (let (line-end in-last-line)
1017+ (while (and (< (point ) (min end (point-max )))
1018+ (not in-last-line))
1019+ (setq line-end (line-end-position ))
10181020 (when (and (search-forward " #" line-end t )
10191021 (not (php-in-string-or-comment-p))
10201022 (not (looking-at " [[]" )))
10211023 (c-put-char-property (1- (point )) 'syntax-table (string-to-syntax " <" ))
10221024 (c-put-char-property line-end 'syntax-table (string-to-syntax " >" )))
1023- (move-beginning-of-line 2 )))))
1025+ (move-beginning-of-line 2 )
1026+ (setq in-last-line (>= line-end (point )))))))
10241027
10251028(defun php-heredoc-syntax ()
10261029 " Mark the boundaries of searched heredoc."
You can’t perform that action at this time.
0 commit comments