From 756a16769cf04c553df636ce68ad416a456713f8 Mon Sep 17 00:00:00 2001 From: Willow Barraco Date: Wed, 17 Jul 2024 16:38:56 +0200 Subject: [PATCH] php: improve heredoc Support nowdoc, and make ';' optional --- rc/filetype/php.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/filetype/php.kak b/rc/filetype/php.kak index 62ba6dddf..98da9e028 100644 --- a/rc/filetype/php.kak +++ b/rc/filetype/php.kak @@ -39,7 +39,7 @@ add-highlighter shared/php/doc_comment2 region /\*\* \*/ ref php/d add-highlighter shared/php/comment1 region // '$' fill comment add-highlighter shared/php/comment2 region /\* \*/ fill comment add-highlighter shared/php/comment3 region '#' '$' fill comment -add-highlighter shared/php/heredoc region -match-capture '<<<(.*?)$' '^\h*(.*?);' fill string +add-highlighter shared/php/heredoc region -match-capture '<<<''?(.*?)''?$' '^\h*(.*?);?$' fill string add-highlighter shared/php/code/ regex &?\$\w* 0:variable