From e0db4b1fcbd40e00f7623973c010abc7513f0352 Mon Sep 17 00:00:00 2001 From: gtema Date: Mon, 5 Sep 2022 10:48:09 +0000 Subject: [PATCH] drop eventual figure width and height Reviewed-by: Goncharov, Artem Co-authored-by: gtema Co-committed-by: gtema --- otc_doc_convertor/convertor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/otc_doc_convertor/convertor.py b/otc_doc_convertor/convertor.py index 8be286906..673dddea1 100644 --- a/otc_doc_convertor/convertor.py +++ b/otc_doc_convertor/convertor.py @@ -142,6 +142,10 @@ class OTCDocConvertor: # Store all referred images for copying self.doc_images.add(img['src']) img['src'] = '/_static/images/' + img['src'] + if "width" in img: + del img["width"] + if "height" in img: + del img["height"] figure.append(img) i.replace_with(figure) elif "section" in i.get('class', []):