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

[bug]: defaults in default YAML does not interpolate ${.} #8024

Open
gabyx opened this issue Apr 17, 2022 · 3 comments
Open

[bug]: defaults in default YAML does not interpolate ${.} #8024

gabyx opened this issue Apr 17, 2022 · 3 comments
Labels

Comments

@gabyx
Copy link

gabyx commented Apr 17, 2022

Explain the problem.

The defaults: section does not interpolate ${.}, which it should according to documentation.
Probably the interpolation was forgotten in these paths.

general.yaml:

defaults: ${.}/general2.yaml

general2.yaml:

eol: lf
echo "asd" | pandoc --data-dir=. --defaults=general.yaml -f markdown -t markdown
pandoc: ${.}/general2.yaml: openBinaryFile: does not exist (No such file or directory)

Pandoc version?
2.18

@wlupton
Copy link
Contributor

wlupton commented Apr 10, 2023

Unless it's intentional that the ${} syntax is not supported in this context, this does indeed seem to be a bug?

@svenboulanger
Copy link

svenboulanger commented Sep 16, 2024

This is also an issue for the to-field, which can be used to specify the writer.

The following defaults yml file fails to resolve the ${.}:

from: markdown
to: ${.}\writer.docx.lua

[edit] I imagine it might also fail for the from field. I don't have a reader handy so didn't check.

@jgm
Copy link
Owner

jgm commented Sep 16, 2024

The way the architecture works currently, it is not trivial to add interpolation in defaults. I'll need to restructure things somehow to make that work. (Technical note: the issue is that the JSON/YAML parser doesn't have access to state.)

Adding interpolation to to and from should be straightforward; I'll do that.

jgm added a commit that referenced this issue Sep 16, 2024
...in defaults files. These can contain paths of custom readers and
writers. See #8024.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants