diff options
author | jgmdev <jgmdev@gmail.com> | 2022-11-11 14:04:28 -0400 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2022-11-11 14:04:28 -0400 |
commit | 9aa0e81ab9aa2ffeb28f94eb48eee7638f6d57f0 (patch) | |
tree | 5083051452729f997957a6895c8980e402967c7a /plugins | |
parent | daadc666291c3c51bfe836d7079e4a284dd18cbd (diff) | |
download | lite-xl-plugins-9aa0e81ab9aa2ffeb28f94eb48eee7638f6d57f0.tar.gz lite-xl-plugins-9aa0e81ab9aa2ffeb28f94eb48eee7638f6d57f0.zip |
language_php: added backticks support
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/language_php.lua | 12 |
1 files changed, 12 insertions, 0 deletions
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" }, |