Fixes Return empty list in DescriptionList.getBlocks() instead of return a list of DescriptionListItems, which are not blocks
MODIFY
asciidoctorj-core/src/main/java/org/asciidoctor/jruby/ast/impl/DescriptionListImpl.java
asciidoctorj-core/src/main/java/org/asciidoctor/jruby/ast/impl/DescriptionListImpl.java
@@ -9,6 +9,8 @@ import org.jruby.runtime.builtin.IRubyObject;
import java.util.List;
+import static java.util.Collections.emptyList;
+
public class DescriptionListImpl extends StructuralNodeImpl implements DescriptionList {
public DescriptionListImpl(IRubyObject delegate) {
@@ -39,7 +41,6 @@ public class DescriptionListImpl extends StructuralNodeImpl implements Descripti
@Override
public List<StructuralNode> getBlocks() {
- RubyArray rubyBlocks = (RubyArray) getRubyProperty("blocks");
- return new RubyBlockListDecorator<>(rubyBlocks);
+ return emptyList();
}
}

MODIFY
asciidoctorj-core/src/test/groovy/org/asciidoctor/WhenTheSourceShouldBeAccessed.groovy
asciidoctorj-core/src/test/groovy/org/asciidoctor/WhenTheSourceShouldBeAccessed.groovy
@@ -103,8 +103,7 @@ That::
and should continue here'''
listItem.description.text == '''list item should show bar
and should continue here'''
- list.blocks.size() == list.items.size()
- list.items[0].description.source == list.blocks[0].description.source
+ list.blocks.size() == 0
}
def 'it should be possible to get the raw text from a table cell'() {

Fixes #1082. Return empty list in DescriptionList.getBlocks() instead of return a list of DescriptionListItems, which are not blocks