I have noticed a stange behaviour:
[source,java]
----
parent.getDocument().getAttr("docfile").toString()
----
I get a truncated value of the expected docfile (the last 8 characters)
If I do it like this, I get the complete expected value:
[source,java]
----
Map<Object, Object> options = parent.getDocument().getOptions();
for (Object optionKeyObj : options.keySet()) {
if (optionKeyObj instanceof RubySymbol) {
if ("attributes".equals(((RubySymbol) optionKeyObj).toJava(String.class))) {
Object attributesObj = options.get(optionKeyObj);
if (attributesObj instanceof Map<?, ?>) {
Map<?, ?> attributes = (Map<?, ?>) attributesObj;
Object docfile = attributes.get("docfile");
if (docfile != null) {
return docfile.toString();
}
}
}
}
}
return null;
----
Tested on window with:
* asciidoctorj.version: 1.5.4
* jruby.version: 1.7.21
* Java 1.7