asciidoctor-intellij-plugin
asciidoctor-intellij-plugin copied to clipboard
When use the inline included, leveloffset should be honoured.
In a top-level crud.adoc file, I have:
include::crud/updating.adoc[leveloffset=+1]
where updating.adoc starts:
= Updating
yada yada
When I inline this, I expect that the headers are incremented, so that the inline text reads:
== Updating
yada yada
However, it is unchanged.
Thanks for reporting this.
The inline of include doesn't respect any include attribute. Some of them are impossible to inline (for example tags). Therefore the next version will not show this intent once include attribute are defined in the brackets.
OK fair enough. Perhaps a different ticket would be to introduce support for selected attributes, such as leveloffset? Appreciate that it's more effort, I suppose it depends whether the API you are using gives you an AST you can manipulate, or just a bunch of text.
It is all AST, and they can be manipulated. The plugin already does this in several other places already. Still, it will be some work here to get it right in all the cases. Examples would be the three different styles of headings, sub-includes etc. Let's see and take it one step at a time.
Pre-release 0.30.46 offers this only when the include has no attributes. I'm re-labeling this issue as an enhancement to add support for leveloffset and possibly other attributes when inlining and include.