diff options
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/parser/luadoc.lua | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md index 8ada9c72..c66283cd 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ <!-- Add all new changes here. They will be moved under a version at release --> * `NEW` Add matching checks between the shape of tables and classes, during type checking. [#2768](https://github.com/LuaLS/lua-language-server/pull/2768) * `FIX` Error `attempt to index a nil value` when `Lua.hint.semicolon == 'All'` [#2788](https://github.com/LuaLS/lua-language-server/issues/2788) +* `FIX` Incorrect LuaCats parsing for `"'"` ## 3.10.3 `2024-8-8` 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 |