-
Notifications
You must be signed in to change notification settings - Fork 320
Add prefix/suffix to ids generated #66
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
Add prefix/suffix to ids generated #66
Conversation
* Adds the ability for IdGenerator to be passed in prefixes and suffixes that will ensure to be added in-front/after every id. This will allow users to 'namespace' their generated ids to a certain pool.
| .build(); | ||
| } | ||
|
|
||
| public static HeadingIdAttributeProvider create() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure i should remove this create method. This isn't part of the public API, and will be unused if using the public API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, feel free to remove it 👍.
robinst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just two minor things to fix and then we can merge this.
| return create(builder()); | ||
| } | ||
|
|
||
| public static Extension create(Builder builder) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not need to be public. Instead, just pass the builder to the private constructor. See what we do in HtmlRenderer.
| .build(); | ||
| } | ||
|
|
||
| public static HeadingIdAttributeProvider create() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, feel free to remove it 👍.
that will ensure to be added in-front/after every id. This will
allow users to 'namespace' their generated ids to a certain pool.