[Question] Document attributes can reference each other, but not conf attributes?
ShadowKyogre opened this issue · 2 comments
Minimal test case:
:ABC: CYE
:DEF: byee{ABC}
{ABC}{DEF}
hihi
Output when piped to asciidoc:
https://ptpb.pw/3X_d.html
Output when piped to asciidoc with asciidoc -a ABC=LOL -a DEF='{ABC}{ABC}NONONO'
:
https://ptpb.pw/T6SM.html
I'm not sure why this happens. I hadn't noticed this for a while since for what I've written, I wrote the attribute definitions in an asciidoc and included those in other asciidocs to get expanded attributes that reference each other.
In addition to this, document-level attributes can start with a number. conf level attributes can't, peculiarly enough.
-
it appears that it is substituted, but
ABC
is found to be undefined and so theDEF
attribute is undefined, so your line gets dropped. This could be because the order of processing the command line options is undefined. Best to use the include file method. -
Attribute names in attribute lists are limited to valid Python identifiers as a side effect of the implementation, and so the parser for document attributes is the same. But command line attributes are not parsed, so they are not limited. Its just a side-effect of the implementation.