Login  Register

Asciidoctor 0.1.3 attributes and conflict with AJI

Posted by asotobu on Jun 01, 2013; 6:33pm
URL: https://discuss.asciidoctor.org/Asciidoctor-0-1-3-attributes-and-conflict-with-AJI-tp258.html

In version 0.1.3 of asciidoctor you can specify attributes as Hash, String or Array, when from AJI I specify attributes as Map, an org.jruby.exceptions.RaiseException: (ArgumentError) illegal type for attributes option exception is thrown.

I have debug the code and I have seen that JRuby transforms a Map to a RubyHash object (which with previous versions of asciidoctor works fine), concretely Java::JavaUtil::HashMap, so when asciidoctor executes the if/else to know if a String, Array or Hash has been passed as argument, it doesn't match any class and the exception is thrown.

I will try to transform this object to native Hash but maybe (hope not) it will require some kind of modification from asciidoctor part.

Well I will keep all of you informed about this important issue.