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

listCommands not picking up variables e.g. +++INS variablename+++ when it is located in the header and footer #239

Closed
samibarasi opened this issue Sep 26, 2021 · 2 comments
Assignees
Labels

Comments

@samibarasi
Copy link

When using the listCommand function I don't get the expected variables listed that are defined in the footer and header portion of the file.
Bildschirmfoto 2021-09-26 um 12 06 34
Bildschirmfoto 2021-09-26 um 12 08 08

I have to workaround this issue with setting an ALIAS in the content area for every variable set in the header or footer to get them appear in the list of variables.
Bildschirmfoto 2021-09-26 um 13 56 25
Bildschirmfoto 2021-09-26 um 14 04 56

@jjhbw
Copy link
Collaborator

jjhbw commented Sep 28, 2021

Thanks for reporting. This is indeed a bug. The listCommands function only looks in the main XML file, not the ones that cover the header and footer.

@jjhbw jjhbw self-assigned this Sep 28, 2021
@jjhbw jjhbw added the bug label Sep 28, 2021
@jjhbw
Copy link
Collaborator

jjhbw commented Sep 28, 2021

Fixed in next release https://github.com/guigrpa/docx-templates/releases/tag/v4.8.1. Should hit npm in a minute.

@jjhbw jjhbw closed this as completed Sep 28, 2021
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

2 participants