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

Expose the AsciiDoc counter facility as an API #488

Open
mojavelinux opened this issue Jul 17, 2016 · 1 comment
Open

Expose the AsciiDoc counter facility as an API #488

mojavelinux opened this issue Jul 17, 2016 · 1 comment
Milestone

Comments

@mojavelinux
Copy link
Member

Asciidocotor has built-in support for counter attributes. Provide an API to allow the counter under these attributes to be used. This is particularly useful in extensions.

This method should be added to Document:

  • counter(String name, Object seed) - Get the next number in the sequence for this counter, initializing it with the seed value if not already set

We should verify that after a counter is retrieved from the API, it continues to get used when resolved in the AsciiDoc source.

{counter:tab-index}

There are methods on the Ruby API that can be used to control the internal state.

@robertpanzer
Copy link
Member

@mojavelinux Would be great if you could take a look at #493

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