-
Notifications
You must be signed in to change notification settings - Fork 25.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOCS] Add :
to render multiple inline macros in Asciidoctor
#41615
[DOCS] Add :
to render multiple inline macros in Asciidoctor
#41615
Conversation
Pinging @elastic/es-docs |
@@ -35,8 +35,10 @@ required. For more information, see | |||
{xpack-ref}/encrypting-data.html[Encrypting sensitive data in {watcher}]. | |||
|
|||
`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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed f7ba3b0 to implement ifdef::asciidoctor[]
. Thanks again, Nik!
:
to render multiple inline macros in Asciidoctor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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