Fix build against Asciidoctor 1.5.6.dev
MODIFY
asciidoctorj-core/src/main/resources/org/asciidoctor/internal/asciidoctorclass.rb
asciidoctorj-core/src/main/resources/org/asciidoctor/internal/asciidoctorclass.rb
@@ -2,6 +2,9 @@ module AsciidoctorJ
include_package 'org.asciidoctor'
module Extensions
include_package 'org.asciidoctor.extension'
+ # Treeprocessor was renamed in to TreeProcessor in https://github.com/asciidoctor/asciidoctor/commit/f1dd816ade9db457b899581841e4cf7b788aa26d
+ # This is necessary to run against both Asciidoctor 1.5.5 and 1.5.6
+ TreeProcessor = Treeprocessor
end
end

MODIFY
asciidoctorj-core/src/test/java/org/asciidoctor/WhenAsciiDocIsRenderedToDocument.java
asciidoctorj-core/src/test/java/org/asciidoctor/WhenAsciiDocIsRenderedToDocument.java
package org.asciidoctor;
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.either;
+import static org.hamcrest.Matchers.instanceOf;
+import static org.hamcrest.Matchers.is;
import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
import static org.hamcrest.collection.IsMapContaining.hasKey;
import static org.hamcrest.collection.IsIterableContainingInOrder.contains;
@@ -174,7 +175,11 @@ public class WhenAsciiDocIsRenderedToDocument {
.attributes(AttributesBuilder.attributes().dataUri(true).icons("font"))
.compact(true).asMap();
Document document = asciidoctor.load(DOCUMENT, options);
- assertThat(document.iconUri("note"), is("data:image/png:base64,"));
+ assertThat(document.iconUri("note"),
+ either(
+ is("data:image/png:base64,") // <= Asciidoctor 1.5.5
+ )
+ .or(is("data:image/png;base64,"))); // >= Asciidoctor 1.5.6
}
@Test

Fix build against Asciidoctor 1.5.6.dev