swiftbar / SwiftBar

Powerful macOS menu bar customization tool
https://swiftbar.app
MIT License
2.91k stars 91 forks source link

SF Symbol not parsed when followed immediately by non-whitespace #116

Closed zkarj735 closed 3 years ago

zkarj735 commented 3 years ago

In BitBar the output :battery:100% would render the battery emoji followed by the text 100%.

In SwiftBar the output :battery.100:100% renders only the same text :battery.100:100%.

Interposing a space as :battery.100: 100% renders the SF Symbol followed by the 100% text. At least, I believe the space is rendered. It's a little hard to tell.

melonamin commented 3 years ago

Interposing a space as :battery.100: 100% renders the SF Symbol followed by the 100% text.

Yes, this is exactly how it works. Current parsing is pretty naive and just splits the string by word using empty space(" ").

melonamin commented 3 years ago

I've played a bit with it and from my point of view the current behavior and end result looks good. Space is in its place, leaving it out will lead to a worse result.

So based on that I don't want to invest my time into implementing this at this time, but I'll welcome a pull request.