From a1eac522b70ee65569586ee14a1ecaad6aeed0e2 Mon Sep 17 00:00:00 2001 From: jperon Date: Thu, 20 Apr 2023 12:56:57 +0200 Subject: Fix MoonScript syntax highlighting (#233) * Fix MoonScript syntax highlighting @ was causing weird behavior within strings. * Update language_moon.lua Highlight only @, not the whole property * Update language_moon.lua Forgotten line. --- plugins/language_moon.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/language_moon.lua b/plugins/language_moon.lua index 8042b7d..3ccb7ea 100644 --- a/plugins/language_moon.lua +++ b/plugins/language_moon.lua @@ -21,7 +21,8 @@ syntax.add { { pattern = "[%a_][%w_]*", type = "symbol" }, { pattern = {"\\", "[%a_][%w_]*"}, type = "function" }, { pattern = {"%.", "[%a_][%w_]*"}, type = "function" }, - { pattern = {"@", "[%a_][%w_]*"}, type = "keyword2" }, + { pattern = "@[%a_][%w_]*", type = "keyword2" }, + { pattern = "@", type = "keyword2" }, { pattern = "!", type = "keyword2" }, { pattern = "[%p]", type = "keyword" }, }, -- cgit v1.2.3