Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context awareness in pandoc files is not working #76

Open
FelipeCybis opened this issue Sep 4, 2024 · 0 comments · May be fixed by #77
Open

Context awareness in pandoc files is not working #76

FelipeCybis opened this issue Sep 4, 2024 · 0 comments · May be fixed by #77

Comments

@FelipeCybis
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant