Asciidoctor: Work around "cramped" include statements - #529
Merged
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 ```
Closed
Member
Author
|
@ddillinger I've fixed the line numbers. |
ddillinger
suggested changes
Jan 8, 2019
| @@ -0,0 +1,73 @@ | |||
| require 'added/extension' | |||
Member
Author
There was a problem hiding this comment.
Yeah. We don't need it here. I'll drop it.
There was a problem hiding this comment.
No I mean literally the filename. You meant cramped but it is creamped :)
Member
Author
|
@ddillinger I've pushed a fix for your requested change. Thanks for finding it! |
Member
Author
|
Thanks for keeping me honest @ddillinger! |
bmorelli25
pushed a commit
to bmorelli25/docs
that referenced
this pull request
Feb 15, 2019
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 ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
--lenientand the document looks great! This is how long thebuild takes with asciidoctor:
And this is how long it takes with asciidoc: