nicer formatting
This commit is contained in:
parent
41862d5150
commit
afa326e426
|
@ -148,22 +148,6 @@ function M.lookup()
|
|||
b = y
|
||||
end
|
||||
|
||||
-- select descriptions from rss_content
|
||||
b = b_start
|
||||
local descriptions = {}
|
||||
while true do
|
||||
local x, y = rss_content:find("<description>.-</description>", b, false)
|
||||
|
||||
-- stop if no further occurrences are found
|
||||
if x == nil or y == nil then
|
||||
break
|
||||
end
|
||||
|
||||
-- save substring to descriptions
|
||||
table.insert(descriptions, rss_content:sub(x + 12, y - 13))
|
||||
b = y
|
||||
end
|
||||
|
||||
api.nvim_buf_set_lines(buf, 1, -1, false, {
|
||||
" Found entries: " .. #dates,
|
||||
})
|
||||
|
@ -174,8 +158,6 @@ function M.lookup()
|
|||
current_line = current_line + 1
|
||||
api.nvim_buf_set_lines(buf, current_line, -1, false, { " Date: " .. dates[x] })
|
||||
current_line = current_line + 1
|
||||
api.nvim_buf_set_lines(buf, current_line, -1, false, { "Description: " .. descriptions[x] })
|
||||
current_line = current_line + 1
|
||||
api.nvim_buf_set_lines(buf, current_line, -1, false, { " Website: " .. links[x] })
|
||||
current_line = current_line + 1
|
||||
api.nvim_buf_set_lines(buf, current_line, -1, false, { "" })
|
||||
|
|
Loading…
Reference in New Issue