Skip to content

Commit b8cb330

Browse files
committed
Guard against null content
Closes gh-10
1 parent 1b939ea commit b8cb330

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/io/spring/asciidoctor/backend/codetools/ListingContentConverters.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ public static RubyObject content(RubyObject node) {
5151
Block listingBlock = (Block) NodeConverter.createASTNode(node);
5252
String content = (String) listingBlock.getContent();
5353
for (ListingContentConverter converter : converters) {
54+
content = (content != null) ? content : "";
5455
content = converter.convert(listingBlock, content);
5556
}
56-
return node.getRuntime().newString(content);
57+
return node.getRuntime().newString(content != null ? content : "");
5758
}
5859

5960
}

0 commit comments

Comments
 (0)