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

Support ${} substitutions for all fields in defaults files #8774

Open
wlupton opened this issue Apr 10, 2023 · 2 comments
Open

Support ${} substitutions for all fields in defaults files #8774

wlupton opened this issue Apr 10, 2023 · 2 comments

Comments

@wlupton
Copy link
Contributor

wlupton commented Apr 10, 2023

Please see #7253 and #8024 for context.

The pandoc manual states that (in defaults files), the environment variable interpolation syntax only works in fields that expect file paths.

I would like to substitute values in some PDF engine options, but there's no way that pandoc can know which of these "expect file paths" so I'm wondering why the interpolation syntax can't simply be applied to all fields.

@jgm
Copy link
Owner

jgm commented Apr 10, 2023

Certainly not all fields! A field might include some raw code (e.g. as part of a header-include) or a markdown code block.

We could think about PDF engine options, but there may be delicate issues there too. (Perhaps something like our interpolation syntax has a meaning for some options for some PDF engines?)

@wlupton
Copy link
Contributor Author

wlupton commented Apr 10, 2023

Yes, I can see that expansion shouldn't be unconditional. Within a shell script it is unconditional, but people know that they have to take steps to avoid unwanted expansions.

So perhaps we need something like this (cf filters)?

pdf-engine-opts:
  - 'string-option-no-expansion'
  - expand: true
    value: ${USERDATA}/file.ext

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

No branches or pull requests

2 participants