Skip to content

Context awareness in pandoc files is not working #76

@FelipeCybis

Description

@FelipeCybis

Hey, thanks for the awesome plugin!

I started testing it recently, but I had difficulty using the context awareness in pandoc-like files.

After some debugging I am pretty sure this is the root:
In telescope-bibtex.utils.parsePandoc we have this last for loop to get the bib filename.

for _, bib in ipairs(bibs) do
local rel_bibs = M.extendRelativePath(bib)
local found = nil
if M.fileExists(bib) then
found = bib
elseif M.fileExists(rel_bibs) then
found = rel_bibs
end
if found ~= nil then
table.insert(files, bib)
end
end

but if bib file do not exist and rel_bibs exist. it should insert rel_bibs and not bib. In other words, it should insert found.

With this fix, it seems to work as intended and as it works in latex files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions