-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Ditaa command line options
- Loading branch information
Pepijn Van Eeckhoudt
authored and
Pepijn Van Eeckhoudt
committed
Mar 26, 2015
1 parent
10554e3
commit 887a577
Showing
6 changed files
with
42 additions
and
7 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
|
@@ -118,4 +118,35 @@ | |
expect(target).to match /\.png$/ | ||
expect(File.exists?(target)).to be true | ||
end | ||
|
||
it "should support ditaa options as attributes" do | ||
doc = <<-eos | ||
= Hello, PlantUML! | ||
Doc Writer <[email protected]> | ||
== First Section | ||
[ditaa, options="--no-shadows --no-separation --round-corners --scale 2.5"] | ||
---- | ||
+--------+ +-------+ +-------+ | ||
| | --+ ditaa +--> | | | ||
| Text | +-------+ |diagram| | ||
|Document| |!magic!| | | | ||
| {d}| | | | | | ||
+---+----+ +-------+ +-------+ | ||
: ^ | ||
| Lots of work | | ||
+-------------------------+ | ||
---- | ||
eos | ||
|
||
d = Asciidoctor.load StringIO.new(doc) | ||
expect(d).to_not be_nil | ||
|
||
b = d.find { |b| b.context == :image } | ||
expect(b).to_not be_nil | ||
target = b.attributes['target'] | ||
expect(target).to match /\.png$/ | ||
expect(File.exists?(target)).to be true | ||
end | ||
end |