Asciidoctor: Copy callout icons - #570
Conversation
Adds support for copying callout icons into the directory containing the built documents. Without this callout icons all 404 which is sad because they are pretty.
|
I've made an effort not to conflict with #565 but a little conflict is impossible to avoid I think. |
|
This one'll need master merged into it and a few paths fixed up before merging. |
| '-a' => 'asciidoc-dir=' . $asciidoc_dir, | ||
| $resources ? ( '-a' => 'resources=' . join(',', @$resources)) : (), | ||
| '-a' => 'resources=' . join(',', @$resources), | ||
| '-a' => 'copy-callout-images=png', |
There was a problem hiding this comment.
Does this mean they'll always and forever have to be png? That may be totally fine, I just am asking to be sure that it is known and definitely totally fine :)
There was a problem hiding this comment.
They are current pngs. We could change it here to whatever we have images for though.
| "$dest/index.xml" | ||
| ); | ||
| unlink "$dest/index.xml"; | ||
| # unlink "$dest/index.xml"; |
| copy_image block, uri | ||
| else | ||
| extension = block.attr 'copy-callout-images' | ||
| if block.parent && block.parent.context == :colist |
There was a problem hiding this comment.
This could be an elsif on line 24 right? There's no other in-scope usage of extension anyway here.
There was a problem hiding this comment.
Ah! This is what that empty test block was about! It looks like I never finished it. sorry!
| } | ||
| end | ||
|
|
||
| it "copies a images for callouts when requested (png)" do |
| ]) | ||
| end | ||
|
|
||
| it "copies a images for callouts when requested (gif)" do |
| ]) | ||
| end | ||
|
|
||
| it "has a nice error message when a callout image is missing" do |
| ]) | ||
| end | ||
|
|
||
| it "doesn't copy callout images if the extension isn't set" do |
There was a problem hiding this comment.
Thanks for catching this! I never finished it. I'll get it soon!
|
@ddillinger I pushed a few patches to finish this off. Thanks again for catching it! |
|
Thanks @ddillinger! |
Adds support for copying callout icons into the directory containing the built documents. Without this callout icons all 404 which is sad because they are pretty.
Adds support for copying callout icons into the directory containing the
built documents. Without this callout icons all 404 which is sad because
they are pretty.