-
Notifications
You must be signed in to change notification settings - Fork 345
Asciidoctor: Work around "cramped" include statements #529
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
Conversation
We do a fair bit of: ``` include::resources/1.adoc[] include::resources/2.adoc[] ``` In our asciidoc files. Asciidoctor would prefer that we do: ``` include::resources/1.adoc[] include::resources/2.adoc[] ``` but asciidoc doesn't care. To be compatible with asciidoc this works around asciidoctor's preference, preventing the parsing error that come about because of using these "cramped" include statements by adding a trailing new line every time we include an asciidoc file. This is a little crude but it works like a charm. With this, I can now build the Elasticsearch Java REST Client reference without `--lenient` and the document looks great! This is how long the build takes with asciidoctor: ``` real 0m7.652s user 0m7.080s sys 0m0.538s ``` And this is how long it takes with asciidoc: ``` real 0m44.987s user 0m38.715s sys 0m6.256s ```
@ddillinger I've fixed the line numbers. |
@@ -0,0 +1,73 @@ | |||
require 'added/extension' |
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.
This filename is typo'd
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.
Yeah. We don't need it here. I'll drop it.
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.
No I mean literally the filename. You meant cramped
but it is creamped
:)
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.
Ah!
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.
Fixed!
@ddillinger I've pushed a fix for your requested change. Thanks for finding it! |
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!
Thanks for keeping me honest @ddillinger! |
We do a fair bit of: ``` include::resources/1.adoc[] include::resources/2.adoc[] ``` In our asciidoc files. Asciidoctor would prefer that we do: ``` include::resources/1.adoc[] include::resources/2.adoc[] ``` but asciidoc doesn't care. To be compatible with asciidoc this works around asciidoctor's preference, preventing the parsing error that come about because of using these "cramped" include statements by adding a trailing new line every time we include an asciidoc file. This is a little crude but it works like a charm. With this, I can now build the Elasticsearch Java REST Client reference without `--lenient` and the document looks great! This is how long the build takes with asciidoctor: ``` real 0m7.652s user 0m7.080s sys 0m0.538s ``` And this is how long it takes with asciidoc: ``` real 0m44.987s user 0m38.715s sys 0m6.256s ```
We do a fair bit of:
In our asciidoc files. Asciidoctor would prefer that we do:
but asciidoc doesn't care. To be compatible with asciidoc this works
around asciidoctor's preference, preventing the parsing error that come
about because of using these "cramped" include statements by adding a
trailing new line every time we include an asciidoc file. This is a
little crude but it works like a charm.
With this, I can now build the Elasticsearch Java REST Client reference
without
--lenient
and the document looks great! This is how long thebuild takes with asciidoctor:
And this is how long it takes with asciidoc: