mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-30 17:59:17 +08:00
Docx reader: don't look to ext tags for image extent.
This was added in 7ff1b798c4
but was mistaken and could cause images to be parsed with
the wrong sizes.
Closes #11580.
This commit is contained in:
@@ -1234,7 +1234,7 @@ elemToExtent el =
|
||||
(Just w, Just h) -> Just (w, h)
|
||||
_ -> Nothing
|
||||
where
|
||||
getDim at = filterElementName (\n -> qName n `elem` ["extent", "ext"]) el
|
||||
getDim at = filterElementName (\n -> qName n == "extent") el
|
||||
>>= findAttr (QName at Nothing Nothing) >>= safeRead
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
^D
|
||||
<p>Lorem ipsum.</p>
|
||||
<figure>
|
||||
<img src="media/image1.png" style="width:1.10263in;height:1.10263in" />
|
||||
<img src="media/image1.png" style="width:1.09702in;height:1.09702in" />
|
||||
<figcaption><p>Blue square.</p></figcaption>
|
||||
</figure>
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user