asciidoctor-vscode
asciidoctor-vscode copied to clipboard
Provide inlay hints of attribute value
technical: regular expression to find attribute references: https://github.com/asciidoctor/asciidoctor/blob/be7356dafd3bdd82d9b515a59997da64f300eaf1/lib/asciidoctor/rx.rb#L153
Wondering in which measure it is possible that the Document "loaded" can provide the list of attribute reference (with their Range?)
Wondering in which measure it is possible that the Document "loaded" can provide the list of attribute reference (with their Range?)
The parsing of inline content in Asciidoctor happens during rendering. In other words, the Asciidoctor AST/Document does not include "inline" nodes.
The AsciiDoc WG (as part of the specification) is currently working on closing this gap but for now using a regular expression is probably the right approach.
Attribute references/substitutions depend on the context:
:attribute-ref: a
{attribute-ref}
----
{attribute-ref}
----
[subs=+attributes]
----
{attribute-ref}
----
But we can ignore that for now.