[DOCS] Add : to render multiple inline macros in Asciidoctor#41615
[DOCS] Add : to render multiple inline macros in Asciidoctor#41615jrodewig merged 3 commits intoelastic:masterfrom jrodewig:asciidoctor-notification-settings
: to render multiple inline macros in Asciidoctor#41615Conversation
|
Pinging @elastic/es-docs |
| `xpack.watcher.history.cleaner_service.enabled`:: | ||
| added[6.3.0,Default changed to `true`.] | ||
| deprecated[7.0.0,Watcher history indices are now managed by the `watch-history-ilm-policy` ILM policy] | ||
| // {empty} attributes are included so both macros render as intended. |
There was a problem hiding this comment.
I think I'd prefer to use ifdef::asciidoctor[] blocks to handle the different way to write this. I think this way works but we only need it if we're going to support both Asciidoctor and AsciiDoc with the same source exactly. I think having ifdef::asciidoctor[] will let us search for it after the migration and we can remove all of the usages. Though we could also remove all the usages of {empty}. Either way is fine, but I think ifdef::asciidoctor[] is a little more consistent.
There was a problem hiding this comment.
The {empty} usage is needed to get Asciidoctor to render correctly, not AsciiDoc. I'm not sure we can remove it after migration, even if we implement ifdef::asciidoctor[].
It seems Asciidoctor won't render two consecutive inline macros without any text between. The {empty} attribute is a hacky way around that.
I'm happy to implement ifdef::asciidoctor[] if we find a better way of rendering the two inline macros in Asciidoctor. My research hasn't turned up any alternative solutions though.
There was a problem hiding this comment.
Does this work for Ascidoctor?
added:[6.3.0,Default changed to `true`.]
deprecated:[7.0.0,Watcher history indices ...]
There was a problem hiding this comment.
With the single :s between the name and the [. That is asciidoctor's native syntax. Nothing between the name and the [ is a thing we twist into place based on heuristics that don't work here.
There was a problem hiding this comment.
Pushed f7ba3b0 to implement ifdef::asciidoctor[]. Thanks again, Nik!
: to render multiple inline macros in Asciidoctor
nik9000
left a comment
There was a problem hiding this comment.
LGTM!
This'll give us an obvious thing to clean up once we don't have to build with AsciiDoc any more!

Without some breaking text, Asciidoctor cannot render two consecutive inline macros without an
:character. This adds that character so both AsciiDoc and AsciiDoctor render the macros as intended.Relates to /elastic/docs#827
Asciidoctor before changes
Asciidoctor after changes
AsciiDoc after changes