You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For certain blocks, calling getContent() can return Opal.nil. Until Asciidoctor > 2.0.18 is released, this can happen if a raw (e.g., passthrough) or verbatim (e.g., listing) block has no lines.
The Opal.nil return value can also happen if this method is called on a block macro. Regardless of this variation in core, I think Asciidoctor.js should protect against client code setting an Opal.nil return value.
The text was updated successfully, but these errors were encountered:
I believe that's already the case in Asciidoctor.js 3.0.
Asciidoctor > 2.0.18 is released
It will actually change the behavior, in Asciidoctor.js 3.0 we return undefined but when building against Asciidoctor > 2.0.18 we return ''. Should Iwe return undefined or ''?
I think we should return undefined. I'm going to update core to return empty string when that's what it should be, but there are times when it should be undefined (block macro).
For certain blocks, calling
getContent()
can return Opal.nil. Until Asciidoctor > 2.0.18 is released, this can happen if a raw (e.g., passthrough) or verbatim (e.g., listing) block has no lines.The Opal.nil return value can also happen if this method is called on a block macro. Regardless of this variation in core, I think Asciidoctor.js should protect against client code setting an Opal.nil return value.
The text was updated successfully, but these errors were encountered: