Fix: Keep empty lines in discussion tree (#173)
* Docs: Fix typos and remove trailing spaces * Fix: Split strings by new lines correctly * Docs: Recommend breakindent option to improve tree nodes indentation * Fix: Replace whole buffer when creating a new suggestion Previously, a trailing empty line was left in the buffer. --------- Co-authored-by: Jakub Bortlík <jakub.bortlik@phonexia.com>
This commit is contained in:
@@ -259,10 +259,11 @@ end
|
||||
---Builds a lua list of strings that contain the MR description
|
||||
M.build_description_lines = function(template_content)
|
||||
local description_lines = {}
|
||||
for line in template_content:gmatch("[^\n]+") do
|
||||
for line in u.split_by_new_lines(template_content) do
|
||||
table.insert(description_lines, line)
|
||||
table.insert(description_lines, "")
|
||||
end
|
||||
-- TODO: @harrisoncramer Same as in lua/gitlab/actions/summary.lua:114
|
||||
table.insert(description_lines, "")
|
||||
|
||||
return description_lines
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user