From 9aa0e81ab9aa2ffeb28f94eb48eee7638f6d57f0 Mon Sep 17 00:00:00 2001 From: jgmdev Date: Fri, 11 Nov 2022 14:04:28 -0400 Subject: language_php: added backticks support --- plugins/language_php.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/language_php.lua b/plugins/language_php.lua index be24eb6..8b3371a 100644 --- a/plugins/language_php.lua +++ b/plugins/language_php.lua @@ -187,6 +187,18 @@ syntax.add { }, type = "string" }, + { pattern = { '`', '`', '\\' }, + syntax = { + patterns = combine_patterns(inline_variables, { + -- prevent matching outside of the parent string + { pattern = "[^`]", type = "string" }, + { pattern = "%p+%f[`]", type = "string" }, + { pattern = "%p", type = "string" }, + }), + symbols = {} + }, + type = "string" + }, { pattern = "0[bB][%d]+", type = "number" }, { pattern = "0[xX][%da-fA-F]+", type = "number" }, { pattern = "-?%d[%d_%.eE]*", type = "number" }, -- cgit v1.2.3