Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Start Resources :counter first time they're used #4335
This is a follow-up issue which proposes a fix for the issue in #4334.
Here's a copy of the proposal from the discussion on discourse for convenience:
In the example I provided, there are 3 PDF files, and I wanted to first set the
So the alternative you provided:
would not work, as that would auto-set the titles of all 3 PDF files.
I thought that my original example:
[[resources]] src = "documents/photo_specs.pdf" title = "Photo Specifications" [[resources]] src = "**.pdf" name = "pdf-file-:counter"
was unambiguous.. set
"An individual counter should be grouped to matcher for each
So in the example I posted, the counter will be grouped only with the second matcher, as only that uses
But if the example had been:
[[resources]] # using arbitrary glob src = "**s.pdf" title = "PDF s #:counter" [[resources]] src = "**.pdf" name = "pdf-file-:counter"
But this would then allow a normal example like in my original post to work exactly as expected.
changed the title
Proposal to create counter<>matcher association only for fields that have the ":counter" placeholder
Jan 27, 2018
referenced this issue
Jan 27, 2018
The older test in #4334 worked fine. But right now, I was trying to create a test case using the params used in 7b472e4 with 4 resource files (
Here is the test case:
[[resources]] src = "*specs.pdf" title = "Specifications #:counter" [[resources]] src = "**.pdf" name = "pdf-file-:counter"
It looks like the name and title counters are not yet independent..
It's as if the matcher with
Do I need to create a new issue for this? Or can you reopen this?
Yes, this is by design. The counter is an item counter, but maybe we could loosen up on that restriction.
But in general, I'm not too keen on discussions in closed issues. I almost never read notifications on those. But don't start a new for this, I will think about it.