ngs-doo / TemplaterExamples

Creating reports in .NET and Java
https://templater.info
The Unlicense
48 stars 27 forks source link

Hiding tag do not remove the new line if its true #35

Closed waqasraz closed 3 years ago

waqasraz commented 3 years ago

When we use the collapse tag if computed as true the tag disappears but the newline space stays.

image

currently it shows like this

image

I want to remove the space. Because it's adding up.

zapov commented 3 years ago

Are you sure collapse metadata is getting invoked? It will not work on the root of the document, but in that case due to your setup hide metadata will trigger and replace tag with empty string.

Its hard to tell without the actual template, but I assume you are missing some kind of collection object there, such as list (without a bullet) or something alike

waqasraz commented 3 years ago

I think I did not explain it will. It does replace with empty sting but what required is to remove the blank line after replace.

zapov commented 3 years ago

Put that tag in a list and choose None from the Bullet library. Also, you most likely don't want :hide metadata in there, so remove it as its most likely causing confusion in your case

zapov commented 3 years ago

Hopefully you managed to resolve this issue. If my suggestion did not work, please reopen and provide document example + relevant JSON