Skip to content

Commit 2fe2ff3

Browse files
committed
fix Incorrect LuaCats parsing for "'"
fix #2757
1 parent 464aad2 commit 2fe2ff3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<!-- Add all new changes here. They will be moved under a version at release -->
55
* `NEW` Add matching checks between the shape of tables and classes, during type checking. [#2768](https://github.com/LuaLS/lua-language-server/pull/2768)
66
* `FIX` Error `attempt to index a nil value` when `Lua.hint.semicolon == 'All'` [#2788](https://github.com/LuaLS/lua-language-server/issues/2788)
7+
* `FIX` Incorrect LuaCats parsing for `"'"`
78

89
## 3.10.3
910
`2024-8-8`

script/parser/luadoc.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ local function parseString(parent)
674674
-- compatibility
675675
if content:sub(1, 1) == '"'
676676
or content:sub(1, 1) == "'" then
677-
if content:sub(1, 1) == content:sub(-1, -1) then
677+
if #content > 1 and content:sub(1, 1) == content:sub(-1, -1) then
678678
mark = content:sub(1, 1)
679679
content = content:sub(2, -2)
680680
end

0 commit comments

Comments
 (0)