do-it-yourself-bar icon indicating copy to clipboard operation
do-it-yourself-bar copied to clipboard

Document that line breaks break formating

Open GM-Script-Writer-62850 opened this issue 3 years ago • 0 comments

while testing this i found that line breaks in the formatted data break it

$ cat -A /tmp/test.txt 
| A | <img src="/usr/share/icons/breeze/apps/16/vvave.svg"/> label text | tool<br/>tip | notify-send 'hello world' |$
| B | <img src="/usr/share/icons/breeze/apps/16/vvave.svg"/> label text | tool<br/>tip | notify-send 'hello\|world' |$
$ qdbus org.kde.plasma.doityourselfbar /id_69 org.kde.plasma.doityourselfbar.pass "$(cat /tmp/test.txt)" # format error
$ qdbus org.kde.plasma.doityourselfbar /id_69 org.kde.plasma.doityourselfbar.pass "$(cat /tmp/test.txt | tr -d '\n')" # no format error, nice

this causes a format error, cause of the line breaks, using tr to strip the line breaks fixes the formatting error

probably also worth noting that just cause you change the script/id the old script's process instance is not terminated

GM-Script-Writer-62850 avatar Nov 16 '21 17:11 GM-Script-Writer-62850