Re: skipping reference to missing attribute
Posted by
mojavelinux on
Feb 27, 2020; 6:19pm
URL: https://discuss.asciidoctor.org/skipping-reference-to-missing-attribute-tp7687p7691.html
The warning is controlled by the attribute-missing attribute. By default, the value is "skip", which produces no warning for a missing attribute (and leaves it as typed). To get a warning, you must set attribute-missing to "warn". So check your settings to see what value is being used and adjust accordingly.
Best,
-Dan
On Thu, Feb 27, 2020 at 2:54 AM halol [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
Hello,
Is there a way to process a document such as the one below, without getting a warning?
The difficulty here is to mix shell variables (using the ${var} notation is a requirement) with asciidoctor attributes in the same block. The final output is fine, but I am getting a lot of warnings and sorting out which ones matter (actually missing asciidoctor attributes) and which one don't (shell variables) is not always easy.
# Test
:attribute-missing: warn
:ADOC_ATTR: asciidoctor
[subs="attributes"]
----
SHELL_VAR="shell"
echo {ADOC_ATTR} ${SHELL_VAR}
----
In this case, the output is:
asciidoctor: WARNING: skipping reference to missing attribute: shell_var
Thanks.
--