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

For loops cause issue with numbered bullet points #137

Open
poweriton opened this issue Aug 12, 2022 · 5 comments
Open

For loops cause issue with numbered bullet points #137

poweriton opened this issue Aug 12, 2022 · 5 comments
Labels
bug Something isn't working cross-references cross-references and numberings help wanted Extra attention is needed high-prio to be addressed in next release syntax template language syntax

Comments

@poweriton
Copy link

Describe the bug
If a for loop wraps a number of sets of bullet points then every iteration of the loop produces a number incremental from the last.

To Reproduce
So we have a for loop around a 2 page letter, within the letter exists a numbered list. When the second letter merges it produces numbers that continue from the previous letter.

Expected behavior
I expected this to restart the numbering on every new merge.

Office versions:

  • MIcrosoft Office 2019

Environment where template is rendered:

  • Stencil version: 3.31
@erdostw
Copy link
Collaborator

erdostw commented Aug 12, 2022

hi, could you share a simplified example template? 🙇

@poweriton
Copy link
Author

poweriton commented Aug 14, 2022 via email

@erdos
Copy link
Owner

erdos commented Aug 17, 2022

Thanks for the detailed report and the example! It seems like the problem is that numbered paragraphs are reusing the same numId so the numbering just continues.

In some cases this is desirable, for example for the following template, we want the numbering to be continuous:

{%for name in names%}
1. {%=name%}
{%end%}

So we would need a way to determine the intention with the numbering for these cases. I will mark the bug as high priority for the next release, but it is not trivial, so it may take some time to resolve.

@erdos erdos added bug Something isn't working help wanted Extra attention is needed syntax template language syntax cross-references cross-references and numberings high-prio to be addressed in next release labels Aug 17, 2022
@poweriton
Copy link
Author

poweriton commented Aug 19, 2022 via email

@poweriton
Copy link
Author

Hi, Have you been able to make any progress with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cross-references cross-references and numberings help wanted Extra attention is needed high-prio to be addressed in next release syntax template language syntax
Projects
None yet
Development

No branches or pull requests

3 participants