Skip to content

Fix for importing document with unwrapped image as last child element

Dan Visel requested to merge unwrapped-image-last-child-element into main

A DOCX that we were provided has an unwrapped image (with no <figure> around it) as the last element. This crashed the code that was wrapping bare <img> elements with a <figure> to prevent later exporting problems.

(This is fixing side effects of things that should be fixed in XSweet – all images should be coming in wrapped in a <figure>.)

Merge request reports