Skip to content

Commit

Permalink
bugfix: parser returned too many items
Browse files Browse the repository at this point in the history
The parser always appended a single empty item to the end of every
parse. This has been fixed.
  • Loading branch information
erooke committed Feb 1, 2022
1 parent 6720fb1 commit 6ba6d01
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lua/telescope/_extensions/bib_parsers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,17 @@ P.file_list = function(str)

elseif commit == Commit.path then
term.path = word
if term.name == nil then

if term.name == nil and state ~= State.done then
table.insert(result, {})
end

elseif commit == Commit.ext then
term.ext = word
table.insert(result, {})

if state ~= State.done then
table.insert(result, {})
end
end

if state == State.done then
Expand Down

0 comments on commit 6ba6d01

Please sign in to comment.