drop eventual figure width and height

Reviewed-by: Goncharov, Artem <artem.goncharov@t-systems.com>
Co-authored-by: gtema <artem.goncharov@gmail.com>
Co-committed-by: gtema <artem.goncharov@gmail.com>
This commit is contained in:
gtema 2022-09-05 10:48:09 +00:00 committed by zuul
parent 4d20aa52ba
commit e0db4b1fcb

View File

@ -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', []):