diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-05-08 14:12:43 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-05-08 14:12:43 +0800 |
commit | 6b2287cba3bd55ce3c8b49e00042b3748bd7bd6b (patch) | |
tree | bea87a69e6ca7a6b15d5545f6088bdf4f4c235b6 /script/core/hover/description.lua | |
parent | 603cc9b709eac3da25988c48cba55c1818a4dcb6 (diff) | |
download | lua-language-server-6b2287cba3bd55ce3c8b49e00042b3748bd7bd6b.zip |
dont convert nl
Diffstat (limited to 'script/core/hover/description.lua')
-rw-r--r-- | script/core/hover/description.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/script/core/hover/description.lua b/script/core/hover/description.lua index 14da4fcf..401ca5a7 100644 --- a/script/core/hover/description.lua +++ b/script/core/hover/description.lua @@ -170,7 +170,7 @@ local function buildEnumChunk(docType, name) or (enum.additional and '+>') or ' |', enum[1], - enum.comment and (' -- %s'):format(enum.comment:gsub('[\r\n]+', ' ')) or '' + enum.comment and (' -- %s'):format(enum.comment) or '' ) end return table.concat(lines, '\n') @@ -264,7 +264,7 @@ local function getFunctionComment(source) comments[#comments+1] = '\n' comments[#comments+1] = ('@*param* `%s` — %s'):format( doc.param[1], - doc.comment.text:gsub('[\r\n]+', ' ') + doc.comment.text ) comments[#comments+1] = '\n' end @@ -280,9 +280,9 @@ local function getFunctionComment(source) end if doc.comment then if #name == 0 then - comments[#comments+1] = ('@*return* — %s'):format(doc.comment.text:gsub('[\r\n]+', ' ')) + comments[#comments+1] = ('@*return* — %s'):format(doc.comment.text) else - comments[#comments+1] = ('@*return* `%s` — %s'):format(table.concat(name, ','), doc.comment.text:gsub('[\r\n]+', ' ')) + comments[#comments+1] = ('@*return* `%s` — %s'):format(table.concat(name, ','), doc.comment.text) end else if #name == 0 then |