Closed sebastian-schlecht closed 4 years ago
I debugged it for a few minutes and found out that some optimisations that were introduced a while back are using regexes now instead of XML tree ops. I suspect there is a bug in the regex that causes to break under certain conditions, i.e. if the description of the image in the word file has a line break (as the test image does).
A different regex eliminates the pains there: https://regex101.com/r/iHSTON/1/
Thank you. Your PR https://github.com/jsreport/jsreport-docx/pull/7 is merged
Hey, while integrating the URL change, I noticed something odd. It seem as the scope of variables causes picture to not be rendered. This is the issue for both url based sources, as well as base64 encoded images.
Example templates: image-n.docx
Render the template above using latest master and the following sample data:
The result is supposed to contain the image at the url, three times, yet the first render (outermost scope) does not replace the placeholder - instead the serialised JSON is present in the tooltip. The images within the loop render fine. Changing
src
to base64 does not change the result.Any thoughts? Am I missing anything here?