diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-03-22 16:15:16 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-03-22 16:15:16 +0800 |
commit | b8627365c0abe5a9d40c91f81b2aef7ea869faad (patch) | |
tree | d1634ad66931919067a9609fb645d99f576bb7ad /test/crossfile | |
parent | 5b6542e8ff276a195c502cc2479b53685429eb2e (diff) | |
download | lua-language-server-b8627365c0abe5a9d40c91f81b2aef7ea869faad.zip |
don't treat half string in comment as string
fix #2013
Diffstat (limited to 'test/crossfile')
-rw-r--r-- | test/crossfile/hover.lua | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua index 3cd560ff..7763d643 100644 --- a/test/crossfile/hover.lua +++ b/test/crossfile/hover.lua @@ -575,7 +575,7 @@ function f(x: string, y: table) @*param* `x` — this is comment -@*param* `y` — comment 1 +@*param* `y` — comment 1 @*return* `name` — comment 2 @@ -746,7 +746,7 @@ function f(a: boolean) --- -@*param* `a` — xxx +@*param* `a` — xxx ```lua a: @@ -1308,7 +1308,7 @@ local n: integer --- - comments]] +comments]] } TEST { @@ -1365,7 +1365,7 @@ local n: integer --- - comments]] +comments]] } TEST { @@ -1384,7 +1384,7 @@ local n: integer --- - comments]] +comments]] } TEST { @@ -1461,7 +1461,7 @@ TEST { --- - comments]] +comments]] } TEST { @@ -1708,7 +1708,7 @@ local x: unknown --- -See: [A](file:///a.lua#1#10) comment1]] +See: [A](file:///a.lua#1#10) comment1]] } TEST { {path = 'a.lua', content = [[ @@ -1728,8 +1728,8 @@ local x: unknown --- See: - * [A](file:///a.lua#1#10) comment1 - * [TTT](file:///a.lua#3#0) comment2]] + * [A](file:///a.lua#1#10) comment1 + * [TTT](file:///a.lua#3#0) comment2]] } TEST { {path = 'a.lua', content = [[ @@ -1755,3 +1755,24 @@ comment2 function f() ```]] } + +TEST { {path = 'a.lua', content = [[ +---"hello world" this is ok +---@param bar any "lorem ipsum" this is ignored +---@param baz any # "dolor sit" this is ignored +local function <?foo?>(bar, baz) +end +]]}, +hover = [[ +```lua +function foo(bar: any, baz: any) +``` + +--- + +"hello world" this is ok + +@*param* `bar` — "lorem ipsum" this is ignored + +@*param* `baz` — "dolor sit" this is ignored]] +} |