From 0ed28fd0c58452591283fdcb949fd8e49b02a657 Mon Sep 17 00:00:00 2001 From: jgmdev Date: Thu, 27 Oct 2022 21:33:21 -0400 Subject: language_php: fix strings not getting terminated The issue can be triggered with code like the following: `'"'.strlen("test:").'"';` would cause the string end to not be found. The additional pattern on this commit allows properly terminating the string by not matching the last closing character. --- plugins/language_php.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/language_php.lua b/plugins/language_php.lua index fda30cb..2820862 100644 --- a/plugins/language_php.lua +++ b/plugins/language_php.lua @@ -87,6 +87,7 @@ local inline_variables = { }, { pattern = "%$[%a_][%w_]*", type = "keyword2" }, { pattern = "%w+", type = "string" }, + { pattern = "[^\"]", type = "string" }, } local function combine_patterns(t1, t2) -- cgit v1.2.3