Re: skipping reference to missing attribute
Posted by
mojavelinux on
Feb 27, 2020; 7:17pm
URL: https://discuss.asciidoctor.org/skipping-reference-to-missing-attribute-tp7687p7693.html
Yes, both are valid options. You can either escape it or disable the warnings.
-Dan
On Thu, Feb 27, 2020, 12:14 David Jencks [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
I think the point is that he wants ${foo} to be the shell literal, not a (missing) asciidoc attribute reference. So escaping the ${ as $\{ prevents asciidoc from interpreting the { in ${ as the start of an attribute.
David Jencks
On Feb 27, 2020, at 10:19 AM, mojavelinux [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
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] <<a href="x-msg://41/user/SendEmail.jtp?type=node&node=7691&i=0" target="_top" rel="nofollow" link="external" class="">[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.
To start a new topic under Asciidoctor :: Discussion, email <a href="x-msg://41/user/SendEmail.jtp?type=node&node=7691&i=1" target="_top" rel="nofollow" link="external" class="">[hidden email]
To unsubscribe from Asciidoctor :: Discussion,
click here.
NAML
--