Support coloring of tags with special characters#738
Support coloring of tags with special characters#738hype09 wants to merge 2 commits intoGothenburgBitFactory:developfrom
Conversation
Signed-off-by: Paik Paustian <git@mail.paik.dev>
Signed-off-by: Paik Paustian <git@mail.paik.dev>
|
Closes #591 |
lauft
left a comment
There was a problem hiding this comment.
Looks good, however it seems to not work with the other config format.
When specifying colors like
define tags:
SP+OC:
color = white on red
tag-with-dashes:
color = blue on gray
the output of timew sum is uncolored... 🤔
|
I did not know of that other format yet - I’ll have a look 👍 |
|
Given the following configuration file content:
I could do a similar change to what I did earlier, only for Do we need to be mindful of this or is it OK if the behavior for those edge cases changes to something more predictable? |
I guess the impact on existing workflows should be low (but you never know... 😅), so I opt for implementing this change 👍🏻 |
As described in #591, adding coloring to a tag
tag-with-dashesvia config breaks the configuration parsing:Additionally, anything that comes after this line in the configuration file is no longer applied.
The reason for this lies in the way the configuration file is parsed, wrongly assuming that everything in front of the
=is recognised as a single token by the lexer.This pull request simplifies the parsing logic by checking if the current line contains a
=symbol. If that's the case, the substrings before and after the symbol are treated as the assigned name and value. This also simplifies the case for settings with no value.