ObeoNetwork / M2Doc

The M2Doc technology enables the generation of Office Open XML documents from models.
http://obeonetwork.github.io/M2Doc/
Eclipse Public License 2.0
39 stars 22 forks source link

Bad management of paragraph markers #464

Closed bsphane closed 2 months ago

bsphane commented 2 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please have a look to the support pages of our website : http://m2doc.org/support/

Current behavior

I have come across a weird behavior of M2Doc. It seems there is are conflicts with the management of several paragraph markers. In particuler, a BR immediately after a DIV produces odd results.

Minimal reproduction of the problem with instructions

My template is the following:

1.1  {M:REQ.REQIFNAME}
{m:req.ReqIFText.fromHTMLBodyString().replaceLink(req).reduceAllImages(380,380)}

If the ReqIfName field contains the following <div id="LHDD__006"><br/>Beginning of the ReqIfText<br/>abc<br/>def<div/>

Then the whole content of the field is displayed in the title. Meaning that it actually merges with the preceding content.

Expected behavior

If the ReqIfName field contains the following <div id="LHDD__006">Beginning of the ReqIfText<br/>abc<br/>def<div/> Then the result is the one one would expect.

Environment


M2Doc version: 3.2.0
Eclipse version: 4.16.0
Platform version:  Windows

ylussaud commented 2 months ago

I don't reproduce this issue with the master branch of M2Doc. I know we did some work on HTML/CSS support in last minor version of M2Doc and I think this has been fixe. If it's not the case please fill free to reopen this issue and attach a template that demonstrate the issue.