asciidoctor / asciidoctor-diagram

:left_right_arrow: Asciidoctor diagram extension, with support for AsciiToSVG, BlockDiag (BlockDiag, SeqDiag, ActDiag, NwDiag), Ditaa, Erd, GraphViz, Mermaid, Msc, PlantUML, Shaape, SvgBob, Syntrax, UMLet, Vega, Vega-Lite and WaveDrom.
http://asciidoctor.org
MIT License
431 stars 106 forks source link

Creating an inline barcode logs an info message #416

Closed ahus1 closed 1 year ago

ahus1 commented 1 year ago

Given the following input

qrcode:https://my-link.tld/something[]

and rendering it with INFO messages enabled (-v)

asciidoctor -r asciidoctor-diagram test.adoc -v

there is a INFO message indicating a possible problem:

asciidoctor: INFO: expected substitution value for custom inline macro to be of type Inline; got String: qrcode:https://my-link.tld/something[]

This only occurs with the inline macro, not with the block macro.

ahus1 commented 1 year ago

Might be related to this - the following code:

qrcode:https://my-link.tld/something[format=txt]

creates this error message:

asciidoctor: ERROR: test.adoc: line 3: Failed to generate image: Asciidoctor::Diagram::BarcodeInlineMacroProcessor does not support output format txt undefined method `include?' for nil:NilClass

pepijnve commented 1 year ago

Looks like I got that wrong when I added inline support. The processor was eagerly converting the Inline node instead of returning it.

mojavelinux commented 1 year ago

That used it be how it was, but it changed in Asciidoctor 2.