From e34e37746c5fdee84b400c94ab9f321651de156c Mon Sep 17 00:00:00 2001 From: Stuart Rackham Date: Tue, 11 Sep 2012 16:19:16 +1200 Subject: 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. --- asciidoc.py | 4 ++++ doc/asciidoc.txt | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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 <> number images). 'iconsdir' -defaults to `./images/icons`. +defaults to `./images/icons`. If admonition icons are embedded using +the <> 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 -- cgit v1.2.1