Skip to content

Asciidoctor: Support adoc files #709

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

Merged
merged 1 commit into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 7 additions & 0 deletions integtest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ check: \
beta_expected_files beta_same_files \
experimental_expected_files experimental_same_files \
missing_include_fails_asciidoc missing_include_fails_asciidoctor \
adoc_expected_files adoc_same_files \
migration_warnings \
readme_expected_files readme_same_files \
simple_all \
Expand Down Expand Up @@ -117,6 +118,12 @@ migration_warnings: migration_warnings.asciidoc
/tmp/readme_asciidoctor: /docs_build/README.asciidoc
$(BD) --asciidoctor --doc /docs_build/README.asciidoc

/tmp/adoc_asciidoc: minimal.adoc
$(BD) --doc $^

/tmp/adoc_asciidoctor: minimal.adoc
$(BD) --asciidoctor --doc $^

# These don't declare dependencies because we don't know in general which files
# are needed to build which asciidoc files.
.PRECIOUS: /tmp/%_asciidoc # don't try to remove the directory. you can't
Expand Down
7 changes: 7 additions & 0 deletions integtest/minimal.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
= Title

== Chapter

This is a minimal viable asciidoc file for use with build_docs. The actual
contents of this paragraph aren't important but having a paragraph here
is required.
4 changes: 2 additions & 2 deletions lib/ES/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ sub build_chunked {
my ( $output, $died );
if ( $asciidoctor ) {
my $dest_xml = $index->basename;
$dest_xml =~ s/\.asciidoc$/\.xml/;
$dest_xml =~ s/\.a(scii)?doc$/\.xml/;
$dest_xml = $dest->file($dest_xml);

%xsltopts = (%xsltopts,
Expand Down Expand Up @@ -201,7 +201,7 @@ sub build_single {
my ( $output, $died );
if ( $asciidoctor ) {
my $dest_xml = $index->basename;
$dest_xml =~ s/\.asciidoc$/\.xml/;
$dest_xml =~ s/\.a(scii)?doc$/\.xml/;
$dest_xml = $dest->file($dest_xml);

%xsltopts = (%xsltopts,
Expand Down