-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolves #282 use imagedir from an image's context during packaging
resolves #169 images in tables don't show up resolves #190 plantumlconfig is looking in the wrong dir resolves #30 Inline images are not included
- Loading branch information
1 parent
dfd72ee
commit 905957c
Showing
16 changed files
with
188 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
= Diagrams book | ||
:doctype: book | ||
|
||
// TODO: https://github.com/asciidoctor/asciidoctor-epub3/issues/190 | ||
// :plantumlconfig: ./plantuml.cfg | ||
|
||
include::subdir/chapter.adoc[] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
' This file only exists to check that plantuml finds it in correct location without warnings' | ||
|
||
skinparam handwritten true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
== Diagrams | ||
:imagesdir: a | ||
|
||
[ditaa, "a"] | ||
.... | ||
+--+ | ||
|A | | ||
+--+ | ||
.... | ||
|
||
:imagesdir: b | ||
|
||
[ditaa, "b"] | ||
.... | ||
+--+ | ||
|B | | ||
+--+ | ||
.... | ||
|
||
:!imagesdir: | ||
|
||
[ditaa, "c"] | ||
.... | ||
+--+ | ||
|C | | ||
+--+ | ||
.... | ||
|
||
:imagesdir: d | ||
|
||
[plantuml, "plantuml"] | ||
--------------------------------------------------------------------- | ||
@startuml | ||
title Accepting Payments: Blocking the GUI and Synchronous | ||
boundary "Web GUI" as GUI | ||
control "API" | ||
boundary "Payment Gateway" as PG | ||
GUI -> API: POST /payments | ||
API -> PG: POST /submitPaymentAttempt | ||
PG -> PG: May take 30-60s to confirm | ||
API <-- PG: HTTP 200 OK | ||
GUI <-- API: HTTP 200 OK | ||
@enduml | ||
--------------------------------------------------------------------- |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
= Inline images | ||
:doctype: book | ||
:imagesdir: imagez | ||
|
||
include::subdir/chapter.adoc[] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
== Chapter | ||
|
||
A | ||
|
||
image:wolpertinger.jpg[] B | ||
|
||
Z | ||
|
||
[separator=¦] | ||
|=== | ||
a¦[ditaa, "inline-diag"] | ||
.... | ||
+--------------+ | ||
|Inline diagram| | ||
+--------------+ | ||
.... | ||
|=== | ||
|
||
[cols="1,1"] | ||
|=== | ||
a|image::square.png[] | ||
a|Do do see a red square on the left? | ||
|=== |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'spec_helper' | ||
require 'asciidoctor-diagram' | ||
|
||
describe 'Asciidoctor::Epub3::Converter - Image' do | ||
it 'supports imagesoutdir != imagesdir != "{base_dir}/images"' do | ||
book, out_file = to_epub 'diagram/book.adoc' | ||
out_dir = out_file.dirname | ||
|
||
expect(out_dir.join('a', 'a.png')).to exist | ||
expect(out_dir.join('b', 'b.png')).to exist | ||
expect(out_dir.join('c.png')).to exist | ||
expect(out_dir.join('d', 'plantuml.png')).to exist | ||
|
||
expect(book).to have_item_with_href('a/a.png') | ||
expect(book).to have_item_with_href('b/b.png') | ||
expect(book).to have_item_with_href('c.png') | ||
expect(book).to have_item_with_href('d/plantuml.png') | ||
end | ||
|
||
it 'supports inline images' do | ||
book, out_file = to_epub 'inline-image/book.adoc' | ||
out_dir = out_file.dirname | ||
|
||
expect(out_dir.join('imagez', 'inline-diag.png')).to exist | ||
|
||
expect(book).to have_item_with_href('imagez/inline-diag.png') | ||
expect(book).to have_item_with_href('imagez/square.png') | ||
expect(book).to have_item_with_href('imagez/wolpertinger.jpg') | ||
end | ||
end |
This file contains 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