Attach UUIDs to Discussion Text (#37)
Three backticks will break the discussion tree, this MR specifically adds custom UUIDs to each text node to avoid this issue.
This commit is contained in:
committed by
GitHub
parent
4f1a0f9c57
commit
6bb7575c6d
@@ -137,8 +137,14 @@ end
|
||||
M.build_note_body = function(note)
|
||||
local text_nodes = {}
|
||||
for bodyLine in note.body:gmatch("[^\n]+") do
|
||||
table.insert(text_nodes, NuiTree.Node({ text = bodyLine, is_body = true }, {}))
|
||||
local line = u.attach_uuid(bodyLine)
|
||||
table.insert(text_nodes, NuiTree.Node({
|
||||
text = line.text,
|
||||
id = line.id,
|
||||
is_body = true
|
||||
}, {}))
|
||||
end
|
||||
|
||||
local noteHeader = "@" ..
|
||||
note.author.username .. " " .. u.format_date(note.created_at)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user