summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2024-08-15 16:16:59 +0800
committer最萌小汐 <sumneko@hotmail.com>2024-08-15 16:16:59 +0800
commit2fe2ff371a8d2ee97a46c1b48eb421d9f8ee65ad (patch)
tree2e3b0bd509874ee32829378d12ad411e186fbebe /script/parser
parent464aad2e42c2d6492eb60dca8049e3d86f89b489 (diff)
downloadlua-language-server-2fe2ff371a8d2ee97a46c1b48eb421d9f8ee65ad.zip
fix Incorrect LuaCats parsing for `"'"`
fix #2757
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/luadoc.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index 7fd73c91..2ae24cca 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -674,7 +674,7 @@ local function parseString(parent)
-- compatibility
if content:sub(1, 1) == '"'
or content:sub(1, 1) == "'" then
- if content:sub(1, 1) == content:sub(-1, -1) then
+ if #content > 1 and content:sub(1, 1) == content:sub(-1, -1) then
mark = content:sub(1, 1)
content = content:sub(2, -2)
end