Closed marcemv90 closed 1 year ago
Hi @marcemv90, Thank You for your kind words, and for opening this issue. You have a very good point! As you may already know, this is a common issue in HTML, since carriage returns ("\r\n" or "\n" characters) are collapsed by default in most HTML elements.
The good news is that my Python code relies on PyYAML
and the built-in json
package to parse YAML and JSON, so carriage returns are maintained. I didn't verify, yet, but I also expect that the library used to generate HTML doesn't remove carriage returns from texts.
There is something missing in the CSS rules, though. Can you please try to apply the following change to the CSS file (either using a dedicated css file, or modifying the one provided with these plugins)?
.nt-timeline .nt-timeline-content {
white-space: pre-line;
}
+.nt-timeline .nt-timeline-content {
+ white-space: pre-line;
+}
And let me know if it helps? We can include this rule in the CSS file.
Hi @RobertoPrevato, it works like a charm 🚀
Hello @RobertoPrevato, first of all congratulations for the great plugins! those are just amazing!
I'm now playing around with the timeline plugin, and just figured out that multi lined content is only possible by typing
<br/>
inside the content.I would expect that the following snippet renders to multiple lines, as per https://yaml-multiline.info
But it renders to a single one:
I'm not sure whether this is the intended behaviour or not, but raising it up here just in case.
Thanks again for the beautiful plugins.
Regards!