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

Automatic task-list truncation breaks with Pango tags #38

Open
nununoisy opened this issue May 17, 2019 · 3 comments
Open

Automatic task-list truncation breaks with Pango tags #38

nununoisy opened this issue May 17, 2019 · 3 comments

Comments

@nununoisy
Copy link

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.

@PapyElGringo
Copy link
Collaborator

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

@aislanmaia
Copy link

Hey @PapyElGringo you have some preview of V2 ? At least something like bullet topics for what V2 will bring?

@PapyElGringo
Copy link
Collaborator

@aislanmaia let's talk about it here #40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants