lib/asciidoctor/block.rb in asciidoctor-2.0.18 vs lib/asciidoctor/block.rb in asciidoctor-2.0.19
- old
+ new
@@ -114,10 +114,10 @@
when :verbatim, :raw
# QUESTION could we use strip here instead of popping empty lines?
# maybe apply_subs can know how to strip whitespace?
result = apply_subs @lines, @subs
if result.size < 2
- result[0]
+ result[0] || ''
else
result.shift while (first = result[0]) && first.rstrip.empty?
result.pop while (last = result[-1]) && last.rstrip.empty?
result.join LF
end