Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I try to develop a plugin for AsciiDoctor (https://github.com/flowdev/asciidoctor-plugin) but can't get a simple test example to run:
org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `include?' for nil:NilClass at RUBY.registered_for_block?(jar:file:/Users/obulbuk/.m2/repository/org/asciidoctor/asciidoctorj/1.5.1/asciidoctorj-1.5.1.jar!/gems/asciidoctor-1.5.0/lib/asciidoctor/extensions.rb:800) at RUBY.next_block(jar:file:/Users/obulbuk/.m2/repository/org/asciidoctor/asciidoctorj/1.5.1/asciidoctorj-1.5.1.jar!/gems/asciidoctor-1.5.0/lib/asciidoctor/parser.rb:675) at RUBY.next_section(jar:file:/Users/obulbuk/.m2/repository/org/asciidoctor/asciidoctorj/1.5.1/asciidoctorj-1.5.1.jar!/gems/asciidoctor-1.5.0/lib/asciidoctor/parser.rb:303) at RUBY.parse(jar:file:/Users/obulbuk/.m2/repository/org/asciidoctor/asciidoctorj/1.5.1/asciidoctorj-1.5.1.jar!/gems/asciidoctor-1.5.0/lib/asciidoctor/parser.rb:52) at RUBY.parse(jar:file:/Users/obulbuk/.m2/repository/org/asciidoctor/asciidoctorj/1.5.1/asciidoctorj-1.5.1.jar!/gems/asciidoctor-1.5.0/lib/asciidoctor/document.rb:448) at RUBY.load(jar:file:/Users/obulbuk/.m2/repository/org/asciidoctor/asciidoctorj/1.5.1/asciidoctorj-1.5.1.jar!/gems/asciidoctor-1.5.0/lib/asciidoctor.rb:1337) at RUBY.convert(jar:file:/Users/obulbuk/.m2/repository/org/asciidoctor/asciidoctorj/1.5.1/asciidoctorj-1.5.1.jar!/gems/asciidoctor-1.5.0/lib/asciidoctor.rb:1415) at RUBY.convert(<script>:66) at org.jruby.gen.InterfaceImpl438942551.convert(org/jruby/gen/InterfaceImpl438942551.gen:13) The test class is: https://github.com/flowdev/asciidoctor-plugin/blob/master/src/test/java/org/flowdev/asciidoctorplugin/FlowparserBlockProcessorTest.java I tried to debug the problem myself in order to see what is 'nil:NilClass'. But the call stack is more than 100 method calls deep of very abstract code. :-( Please help me. If you need additional information, please just ask. Best regards Ole |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
The line that's throwing the exception is at /Users/obulbuk/.m2/repository/org/asciidoctor/asciidoctorj/1.5.1/asciidoctorj-1.5.1.jar!/gems/asciidoctor-1.5.0/lib/asciidoctor/extensions.rb line 800 or if you want to see it on github: https://github.com/asciidoctor/asciidoctor/blob/v1.5.1/lib/asciidoctor/extensions.rb#L800. If I were to venture a guess just looking at the code, it looks like in your example you may not have a delimiting block. You have the [flowdev] part, but you're missing the actual block delimiters. On Wed, Nov 5, 2014 at 6:57 AM, Ole [via Asciidoctor :: Discussion] <[hidden email]> wrote: I try to develop a plugin for AsciiDoctor (https://github.com/flowdev/asciidoctor-plugin) but can't get a simple test example to run: ... [show rest of quote] |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
On Wed, Nov 5, 2014 at 11:02 AM, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote: If I were to venture a guess just looking at the code, it looks like in your example you may not have a delimiting block. You have the [flowdev] part, but you're missing the actual block delimiters. Actually, the problem is that the extension doesn't define any contexts, which is required at the following line: Here's an example of how you define them: At the moment there's a bit of a handoff issue between AsciidoctorJ and Asciidoctor that makes this more complicated than necessary. Begin explicit about the :context and :content_model is always safe. The delimited blocks are always optional...so long as the block is registered on a paragraph. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Thanks soooo much! It works much better now.
![]() Is there any documentation of the possible configuration values for "contexts" and "content_model"? I would need the plugin to run for blocks with delimiters (probably "...."). Ole |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I am using ":literal" for "contexts" and ":compound" for "content_model" now. This seems to work.
Thanks for your help so far! |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
|
In reply to this post by Ole
> Is there any documentation of the possible configuration values for "contexts" and "content_model"? This is an open issue. You can find the answer in the comments. Cheers, -Dan On Thu, Nov 6, 2014 at 4:40 AM, Ole [via Asciidoctor :: Discussion] <[hidden email]> wrote: Thanks soooo much! It works much better now. Dan Allen | http://google.com/profiles/dan.j.allen |
Free forum by Nabble | Edit this page |