summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Rackham <srackham@methods.co.nz>2012-08-01 08:07:02 +1200
committerStuart Rackham <srackham@methods.co.nz>2012-08-01 08:07:02 +1200
commit3d784d57a2cb9007c30cc8ab079e6d51049c2dbd (patch)
tree93558ba38e229b88897df1b5e42e1ba22e747800
parent427d4f244bcdcadec491393e18b97c8e31be31bf (diff)
downloadasciidoc-3d784d57a2cb9007c30cc8ab079e6d51049c2dbd.tar.gz
Updated html5 backend (previous commit was xhtml11 only). See:
https://groups.google.com/group/asciidoc/browse_thread/thread/dbdfaf838f93e020
-rw-r--r--html5.conf8
1 files changed, 4 insertions, 4 deletions
diff --git a/html5.conf b/html5.conf
index c0139b5..241df70 100644
--- a/html5.conf
+++ b/html5.conf
@@ -80,8 +80,8 @@ latexmath-style=template="latexmathblock",subs=()
<span class="image{role? {role}}">
<a class="image" href="{link}">
{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"}>
-{data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"} src="data:image/{eval:os.path.splitext(r'{target}')[1][1:]};base64,
-{data-uri#}{sys3:"{python}" -u -c "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
+{data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"}
+{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print 'src=\"data:'+mimetypes.guess_type(r'{target}')[0]+';base64,'; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
{link#}</a>
</span>
@@ -90,8 +90,8 @@ latexmath-style=template="latexmathblock",subs=()
<div class="content">
<a class="image" href="{link}">
{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}>
-{data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"} src="data:image/{eval:os.path.splitext(r'{target}')[1][1:]};base64,
-{data-uri#}{sys:"{python}" -u -c "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
+{data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}
+{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print 'src=\"data:'+mimetypes.guess_type(r'{target}')[0]+';base64,'; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}">
{link#}</a>
</div>
<div class="title">{caption={figure-caption} {counter:figure-number}. }{title}</div>