linux-show-player icon indicating copy to clipboard operation
linux-show-player copied to clipboard

Description end of line are ignored in "List Layout"

Open Stav88 opened this issue 1 year ago • 1 comments

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 (&lt; &gt; &amp; &quot;) Example :
<p style="white-space:pre-wrap">
line 1
line 2
line 3
this text it inside &lt;p style=&quot;white-space:pre-wrap&quot;&gt;...&lt;/p&gt; tags
</p>

Stav88 avatar Apr 28 '25 23:04 Stav88

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.)

s0600204 avatar Apr 29 '25 02:04 s0600204