Skip to content

Commit

Permalink
Fixes asciidoctor#1082. Return empty list in DescriptionList.getBlock…
Browse files Browse the repository at this point in the history
…s() instead of return a list of DescriptionListItems, which are not blocks
  • Loading branch information
robertpanzer committed Feb 13, 2022
1 parent c521b1c commit 9f554bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -9,6 +9,8 @@

import java.util.List;

import static java.util.Collections.emptyList;

public class DescriptionListImpl extends StructuralNodeImpl implements DescriptionList {

public DescriptionListImpl(IRubyObject delegate) {
Expand Down Expand Up @@ -39,7 +41,6 @@ public String convert() {

@Override
public List<StructuralNode> getBlocks() {
RubyArray rubyBlocks = (RubyArray) getRubyProperty("blocks");
return new RubyBlockListDecorator<>(rubyBlocks);
return emptyList();
}
}
Expand Up @@ -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'() {
Expand Down

0 comments on commit 9f554bd

Please sign in to comment.