Moderator
2 years, 4 months ago
#36547
::
Hi Alex,
You can remove the margin between <div> and <pre> with this CSS adaptation:
pre {
margin: 0;
}
Another option, although I’m not sure if this is too much of a workaround for your use case, is to convert the lines of the text to an array, with each object containing a line:
{
"lines":
[
{"line": "Lorem ipsum do"},
{"line": "lor sit amet,"},
{"line": "consetetur sadipscing elitr,"},
{"line": "sed diam nonumy eirmod tempor invidunt ut labore"},
{"line": "et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores"},
{"line": " et ea rebum."}
]
}
Then, in the body of the template, you can iterate over the lines and create a new div for each line:
{{#lines}}
<div>{{line}}
</div>
{{/lines}}