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

Want attribute substitutions for {counter:name} and {counter2:name} #714

Closed
gdamore opened this issue Jul 11, 2020 · 2 comments · Fixed by #715
Closed

Want attribute substitutions for {counter:name} and {counter2:name} #714

gdamore opened this issue Jul 11, 2020 · 2 comments · Fixed by #715

Comments

@gdamore
Copy link
Collaborator

gdamore commented Jul 11, 2020

The {counter:xxx} counter format of attribute substitution is supposed to let us access counters.

This is likely to be useful for users, and also can help when defining attributes for overrides of captions.

@gdamore
Copy link
Collaborator Author

gdamore commented Jul 11, 2020

This is likely to be most useful combined with #604.

@xcoulon xcoulon added this to the backlog milestone Jul 11, 2020
@gdamore gdamore self-assigned this Jul 11, 2020
@gdamore gdamore modified the milestones: backlog, v0.5.0 Jul 11, 2020
@gdamore
Copy link
Collaborator Author

gdamore commented Jul 11, 2020

I have this working, PR incoming.

@gdamore gdamore changed the title Want attribute substitutions for {counter:table-counter} and co Want attribute substitutions for {counter:name} and {counter2:name} Jul 11, 2020
gdamore added a commit to gdamore/libasciidoc that referenced this issue Jul 11, 2020
This adds support for {counter:name} and {counter2:name}
as attribute substitutions that reference the named counters.

The existing table, image, etc. counters are not converted to use
these yet, but it's likely that doing so will help once attribute
substitution is supported.

Note that when that work is done, care must be taken to ensure that
the counter is incremented when expanded to it's literal value, not
just expanded from the built-in value.

Fixes bytesparadise#714
gdamore added a commit to gdamore/libasciidoc that referenced this issue Jul 11, 2020
This adds support for {counter:name} and {counter2:name}
as attribute substitutions that reference the named counters.

The existing table, image, etc. counters are not converted to use
these yet, but it's likely that doing so will help once attribute
substitution is supported.

Note that when that work is done, care must be taken to ensure that
the counter is incremented when expanded to it's literal value, not
just expanded from the built-in value.

Fixes bytesparadise#714
gdamore added a commit to gdamore/libasciidoc that referenced this issue Jul 11, 2020
This adds support for {counter:name} and {counter2:name}
as attribute substitutions that reference the named counters.

The existing table, image, etc. counters are not converted to use
these yet, but it's likely that doing so will help once attribute
substitution is supported.

Note that when that work is done, care must be taken to ensure that
the counter is incremented when expanded to it's literal value, not
just expanded from the built-in value.

Fixes bytesparadise#714
gdamore added a commit to gdamore/libasciidoc that referenced this issue Jul 12, 2020
This adds support for {counter:name} and {counter2:name}
as attribute substitutions that reference the named counters.

The existing table, image, etc. counters are not converted to use
these yet, but it's likely that doing so will help once attribute
substitution is supported.

Note that when that work is done, care must be taken to ensure that
the counter is incremented when expanded to it's literal value, not
just expanded from the built-in value.

Fixes bytesparadise#714
gdamore added a commit to gdamore/libasciidoc that referenced this issue Jul 12, 2020
This adds support for {counter:name} and {counter2:name}
as attribute substitutions that reference the named counters.

The existing table, image, etc. counters are not converted to use
these yet, but it's likely that doing so will help once attribute
substitution is supported.

Note that when that work is done, care must be taken to ensure that
the counter is incremented when expanded to it's literal value, not
just expanded from the built-in value.

This includes support for setting the start including alpha counters
(English letters only, same as asciidoctor).

Fixes bytesparadise#714
xcoulon pushed a commit that referenced this issue Jul 12, 2020
This adds support for {counter:name} and {counter2:name}
as attribute substitutions that reference the named counters.

The existing table, image, etc. counters are not converted to use
these yet, but it's likely that doing so will help once attribute
substitution is supported.

Note that when that work is done, care must be taken to ensure that
the counter is incremented when expanded to it's literal value, not
just expanded from the built-in value.

This includes support for setting the start including alpha counters
(English letters only, same as asciidoctor).

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

Successfully merging a pull request may close this issue.

2 participants