Page MenuHomePhabricator

Efl.Canvas.Textblock.style_apply: TAB is not recognized as whitespace
Closed, ResolvedPublic

Description

When running the Efl.Canvas.Textblock style elementary_test and pressing TAB, the sample text disappears, because the font color is not recognized anymore due to the <TAB> character being appended to the previous "white" string.

TABS should be treated just like SPACES.

segfaultxavi triaged this task as Normal priority.

As documentation explains, the string passed to style_apply() is a key=value pairs separated by white spaces.
So I think what we currently doing is violating this information.

So I suggest changing the demo to get ride of \r \n \t (keep numbers/letters and whitespaces only) before applying the style.

I think most users will assume that \r \n and \t ARE whitespace characters:
https://en.wikipedia.org/wiki/Whitespace_character

So maybe we can change the implementation to allow these characters as separators too?
Bear in mind that this is not a high priority task.