material-awesome
material-awesome copied to clipboard
Automatic task-list truncation breaks with Pango tags
Sometimes when receiving a title, it contains Pango tags. A simple window title that breaks the parser is " + Why doesn’t this work?????????????" It’s long enough to trigger the shortener, which is quite simple:
text = text:gsub(">(.-)<", ">" .. textOnly:sub(1,21) .. "...<")
Unfortunately, sometimes when Pango tags are used, the text is truncated to
"+ Why does&a" (the &a is a fragment from the apostrophe). Then set_markup_silently(text) fails and the box simply says Invalid Text. Even if it succeeded, the text inside would be much shorter than intended.
I’m suspecting we may need gears.string.xml_escape(), but then the title loses formatting. We might need an extra parsing library for this.
Well nice catch didn't noticed this kind of behavior but I mainly use the same software daily. I would need to dig in it but unfortunately Im a bit short in available time. Im working actively in the in the V2 of the project. So if someone want to try to find a fix for this ? I'll be happy to take PR.
Thanks all
Hey @PapyElGringo you have some preview of V2 ? At least something like bullet topics for what V2 will bring?
@aislanmaia let's talk about it here #40