thombergs / docx-stamper

Easy-to-use template engine for creating docx documents in Java.
MIT License
214 stars 91 forks source link

Bug fix: different formatting in same paragraph #69

Closed ImanGharib closed 5 years ago

ImanGharib commented 5 years ago

Each placeholder gets its own style from the run in wich it exists. related to [issue 67] (https://github.com/thombergs/docx-stamper/issues/67) 68, [64] (https://github.com/thombergs/docx-stamper/issues/64)

ImanGharib commented 5 years ago

The placeholders won't lose the style anymore

ImanGharib commented 5 years ago

Hi @nor-deen, thanks for your information. It happened if placeholders where in the same run. Would be great if you could check it too.

nor-deen commented 5 years ago

Thanks, I "fixed" it(?) with this ~hack~ change PlaceholderReplacer.java:107 rPr = collect.isEmpty()? null :collect.get(0);

ImanGharib commented 5 years ago

has a bug in traversing the runs, which is to be fixed