oreillymedia / asciidoctor-htmlbook

Templates for the htmlbook backend for Asciidoctor
45 stars 15 forks source link

Image "height" and "scale" attributes getting dropped during conversion #83

Closed christopappas closed 8 years ago

christopappas commented 9 years ago

Hello,

We had an RT ticket come in about this, so I did some testing and found that height and scale attributes are getting dropped during conversion, but width attributes are being conserved. Here's my test, htmlbook generated on Atlas:

The asciidoc markup:

[[some_id]]
.has a width attribute
image::images/bitaddress.png[width="2in"]

[[some_id2]]
.has a height attribute
image::images/bitaddress.png[height="2in"]

[[some_id3]]
.has a scale attribute
image::images/bitaddress.png[scale="2"]

The htmlbook markup:

<figure id="some_id">
<img src="images/bitaddress.png" alt="bitaddress" width="2in"/>
<figcaption>has a width attribute</figcaption>
</figure>

<figure id="some_id2">
<img src="images/bitaddress.png" alt="bitaddress"/>
<figcaption>has a height attribute</figcaption>
</figure>

<figure id="some_id3">
<img src="images/bitaddress.png" alt="bitaddress"/>
<figcaption>has a scale attribute</figcaption>
</figure>

Let me know if I can provide any other info.

Thanks, Chris

christopappas commented 8 years ago

Image height handling has now been implemented.

I believe we're not going to implement a scale attribute for now, as there is no image scale attribute in XHTML5.

@sandersk I'm going to close this issue, unless you feel it should otherwise be open!