elkowar / eww

ElKowars wacky widgets
https://elkowar.github.io/eww
MIT License
9.43k stars 383 forks source link

[BUG] Whitespace isn't rendered properly #1117

Open OBLIXi-ON opened 5 months ago

OBLIXi-ON commented 5 months ago

Checklist before submitting an issue

Description of the bug

Whitespace rendering is different from regular convention. For example, to use new line in eww you'll have to put \\n whereas it should be \n. Using \n prints regular n instead . This makes it difficult to use escape character so you can't print \n, \t, or \ as plain text.

Reproducing the issue

Use regular escape characters such as \n, \t.

Expected behaviour

\n should print new line not regular n.

Additional context

No response

w-lfchen commented 2 months ago

escaping things is handled suboptimally, i agree. i'll investigate how this can be improved since rendering a \ required the following eww code: "\\\\"

i think this stems from the fact that the text is pretty much sanitized twice