-
Notifications
You must be signed in to change notification settings - Fork 172
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
AsciidoctorJ fails when registering a block processor instance while passing the name as a parameter #754
Comments
Will this require a change in Asciidoctor? (either to fix it or to remove unused code?) |
No, I can fix it in Asciidoctorj. |
I have to admit though I don't fully understand this part of the code: First Asciidoctor instantiates the extension passing in the name, and then it calls the accessor again. |
While working on this I was wondering if we really want users to implement
As there are proxies between Asciidoctor/Ruby and the users implementation, there is actually no need for these methods anymore. |
…essor-instance-with-name Fixes #754. Initialize BlockProcessor.name correctly
The name is optional. The implementation can provide it. The implementation must also self-identify with the same name that was used to create. That's all the code is doing there. It's a lot of edge cases. Some may not apply to AsciidoctorJ. |
To reproduce:
Register a Block processor passing the name as an argument, i.e. by calling this method:
Rendering a document fails because Asciidoctor calls the
name
accessor of the extension when classes are registered.This error affects AsciidoctorJ 1.6.0 only as previously extension instances were registered to Asciidoctor as instances.
This changed with 1.6.0 as now instances are wrapped in a Ruby class per registration.
The text was updated successfully, but these errors were encountered: