diff options
author | Stuart Rackham <srackham@methods.co.nz> | 2012-09-11 16:19:16 +1200 |
---|---|---|
committer | Stuart Rackham <srackham@methods.co.nz> | 2012-09-11 16:19:16 +1200 |
commit | e34e37746c5fdee84b400c94ab9f321651de156c (patch) | |
tree | 12efcc64d0a289abea37c1e30fa3b0317000fa26 | |
parent | 9b2f8e6b07be5b89dc1f1a135531f38ec7efb7b9 (diff) | |
download | asciidoc-e34e37746c5fdee84b400c94ab9f321651de156c.tar.gz |
If admonition icons are embedded using the Data URI Scheme and the icons
directory is undefined or does not exist then the 'iconsdir' attribute is set
to the location of the icons installed in the AsciiDoc configuration directory.
-rwxr-xr-x | asciidoc.py | 4 | ||||
-rw-r--r-- | doc/asciidoc.txt | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/asciidoc.py b/asciidoc.py index 891b138..1efa0ca 100755 --- a/asciidoc.py +++ b/asciidoc.py @@ -6001,6 +6001,10 @@ def asciidoc(backend, doctype, confiles, infile, outfile, options): # Document header attributes override conf file attributes. document.attributes.update(AttributeEntry.attributes) document.update_attributes() + # Set the default embedded icons directory. + if 'data-uri' in document.attributes and not os.path.isdir(document.attributes['iconsdir']): + document.attributes['iconsdir'] = os.path.join( + document.attributes['asciidoc-confdir'], 'images/icons') # Configuration is fully loaded. config.expand_all_templates() # Check configuration for consistency. diff --git a/doc/asciidoc.txt b/doc/asciidoc.txt index 20e7ccf..5f400d2 100644 --- a/doc/asciidoc.txt +++ b/doc/asciidoc.txt @@ -5901,7 +5901,10 @@ icon images. The name of the directory containing linked admonition icons, navigation icons and the `callouts` sub-directory (the `callouts` sub-directory contains <<X105,callout>> number images). 'iconsdir' -defaults to `./images/icons`. +defaults to `./images/icons`. If admonition icons are embedded using +the <<X66,data-uri>> scheme then the 'iconsdir' attribute defaults to +the location of the icons installed in the AsciiDoc configuration +directory. |imagesdir |html4, html5, xhtml11, docbook | If this attribute is defined it is prepended to the target image file |