Skip to content

Commit 3fc3749

Browse files
committed
Docx reader: don't look to ext tags for image extent.
This was added in 7ff1b79 but was mistaken and could cause images to be parsed with the wrong sizes. Closes #11580.
1 parent f3c3cf7 commit 3fc3749

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Text/Pandoc/Readers/Docx/Parse.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ elemToExtent el =
12341234
(Just w, Just h) -> Just (w, h)
12351235
_ -> Nothing
12361236
where
1237-
getDim at = filterElementName (\n -> qName n `elem` ["extent", "ext"]) el
1237+
getDim at = filterElementName (\n -> qName n == "extent") el
12381238
>>= findAttr (QName at Nothing Nothing) >>= safeRead
12391239

12401240

test/command/9391.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
^D
44
<p>Lorem ipsum.</p>
55
<figure>
6-
<img src="media/image1.png" style="width:1.10263in;height:1.10263in" />
6+
<img src="media/image1.png" style="width:1.09702in;height:1.09702in" />
77
<figcaption><p>Blue square.</p></figcaption>
88
</figure>
99
```

0 commit comments

Comments
 (0)