Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Leading spaces are stripped from text elements #647

Open
3 tasks done
benstockil opened this issue Dec 15, 2022 · 3 comments
Open
3 tasks done

[BUG] Leading spaces are stripped from text elements #647

benstockil opened this issue Dec 15, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@benstockil
Copy link

Checklist before submitting an issue

  • I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
  • I have specifically verified that this bug is not a common user error
  • I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug

Any keading space characters at the start of text elements are stripped before rendering.

e.g. " hello world" is displayed as "hello world"

Reproducing the issue

The following code renders the " on " element without the first space character.

(box :orientation "horizontal"
     :halign "end"
     :class "subtitle"
     :space-evenly false
  "The time is now " 
  (label :class "time" :text {time}) 
  " on "
  (label :class "date" :text {day}) 
  ".")

image

Specs

  • Version: eww 0.4.0 678e4dbc6b6439bf50898ae2b13fcc65900c439c (wayland enabled)
  • WL Compositor: hyprland, commit 826e35 (Dec 4th)
  • Artix Linux (kernel 6.0.7-artix1-1)

Expected behaviour

The leading space characters should be displayed.

Additional context

The inspector shows that the leading space is stripped before being loaded as a GTKLabel object.

image

I can edit the text within the inspector to add the space manually, but this obviously doesn't persist between reloads.

@benstockil benstockil added the bug Something isn't working label Dec 15, 2022
@VuiMuich
Copy link

VuiMuich commented Dec 16, 2022

Have you tried escaping the space like this "\ on "?

@benstockil
Copy link
Author

@VuiMuich Escaping doesn't work, unfortunately.

I think it recognises the attempt to escape because the backslash isn't displayed, but neither is the space.

@nativerv nativerv mentioned this issue Jun 14, 2023
4 tasks
@w-lfchen
Copy link
Contributor

w-lfchen commented Sep 7, 2024

if i'm not mistaken, this issue should be closed by #804
see #1117 for notes about escaping, there are some issues with that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants