aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorTakase <20792268+takase1121@users.noreply.github.com>2024-07-22 10:51:04 +0800
committerGitHub <noreply@github.com>2024-07-22 10:51:04 +0800
commit376185578b8608dbdcf0204f957e32d423f4315d (patch)
treef70fa70f75a3469281394ae58a2e2f14469889c0 /plugins
parent2e3282b88b2cce66d98c9cde19ce7a5697808f3c (diff)
parente4f37fd46e10fd15caac5fb2014d49dac7c69643 (diff)
downloadlite-xl-plugins-376185578b8608dbdcf0204f957e32d423f4315d.tar.gz
lite-xl-plugins-376185578b8608dbdcf0204f957e32d423f4315d.zip
Merge pull request #462 from Guldoman/PR_fix_java_regex
fix: avoid `language_java` catastrophic backtracking
Diffstat (limited to 'plugins')
-rw-r--r--plugins/language_java.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/language_java.lua b/plugins/language_java.lua
index 9fc5b7d..d49472f 100644
--- a/plugins/language_java.lua
+++ b/plugins/language_java.lua
@@ -18,7 +18,7 @@ syntax.add {
{ pattern = "-?%.?%d+f?", type = "number" },
{ pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" },
{ pattern = "[%a_][%w_]*%f[(]", type = "function" },
- { regex = "(?:\\w+\\.?)+(?=\\s+\\w++\\s*\\=\\s*)", type = "function" }, -- Class name when creating an object
+ { regex = "(?:\\w++\\.?)+(?=\\s+\\w++\\s*\\=\\s*)", type = "function" }, -- Class name when creating an object
{ regex = "[A-Z][A-Z_]+", type = "keyword2" }, -- Constants
{ pattern = "[%a_][%w_]*", type = "symbol" },
},