linux-show-player
linux-show-player copied to clipboard
Description end of line are ignored in "List Layout"
To Reproduce
- Create a project using "List" layout
- Create a cue (cue type is not important)
- Edit the cue to create a multiline text
Example:
line 1 line 2 line 3 - Save the cue
- Look at description next to the "GO" button
Expected behavior The text is multiline
line 1
line 2
line 3
Expected behavior The text is written in a single line
line 1 line 2 line 3
Linux Show Player version:
- 0.6.3 (Flatpak)
- 0.6.5 (Flatpak)
OS Version
- Xubuntu 24.04
Additional context
- On version 0.5.* end of line where shown
- On version 0.6.* the description is interpreted as HTML. I don't know if it is expected or not. But in HTML end of line are ignored except if we use a css
white-space:pre-wrap.
Workaround
- Add tag
<p style="white-space:pre-wrap">...</p>around the text. - Special HTML charcters (
<>&") must be replaced with there entities (< > & ") Example :
<p style="white-space:pre-wrap">
line 1
line 2
line 3
this text it inside <p style="white-space:pre-wrap">...</p> tags
</p>
On version 0.6.* the description is interpreted as HTML.
Not quite: in version 0.6.x, the description is interpreted as Markdown. (Or at least, Qt's particular take on it.)
Thus, either double spacing the lines:
line 1
line 2
line 3
Or single spacing with backslashes at the end of all but the last line:
line 1\
line 2\
line 3
Will work.
(And yes, I know that the default "dialect" for .setMarkdownText() is MarkdownDialectGitHub, and that as single spacing works here on GitHub it should also work in Qt... but it doesn't.)