Skip to content
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

Merged
merged 3 commits into from
May 1, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/reference/settings/notification-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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 ...]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately not.

Input

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] 

Asciidoctor output
Screen Shot 2019-05-01 at 1 50 34 PM

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:doh: That did the trick. Fixed it up with f31252b. Thanks again for your near-infinite patience and help, @nik9000.

Copy link
Contributor Author

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!

// Removing the attributes will break their display in Asciidoctor.
added[6.3.0,Default changed to `true`.] {empty}
deprecated[7.0.0,Watcher history indices are now managed by the `watch-history-ilm-policy` ILM policy] {empty}
+
Set to `true` (default) to enable the cleaner service. If this setting is
`true`, the `xpack.monitoring.enabled` setting must also be set to `true` with
Expand Down