aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuldoman <giulio.lettieri@gmail.com>2024-07-22 04:37:15 +0200
committerGuldoman <giulio.lettieri@gmail.com>2024-07-22 04:39:12 +0200
commite4f37fd46e10fd15caac5fb2014d49dac7c69643 (patch)
treef70fa70f75a3469281394ae58a2e2f14469889c0
parent2e3282b88b2cce66d98c9cde19ce7a5697808f3c (diff)
downloadlite-xl-plugins-e4f37fd46e10fd15caac5fb2014d49dac7c69643.tar.gz
lite-xl-plugins-e4f37fd46e10fd15caac5fb2014d49dac7c69643.zip
fix: avoid `language_java` catastrophic backtracking
-rw-r--r--manifest.json2
-rw-r--r--plugins/language_java.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/manifest.json b/manifest.json
index f8233b2..e6d7422 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1138,7 +1138,7 @@
"tags": [
"language"
],
- "version": "0.1.1"
+ "version": "0.1.2"
},
{
"description": "Syntax for the [jiyu](https://github.com/machinamentum/jiyu) programming language",
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" },
},