forked from enlightenment/efl
Edje textblock: Fixed issue with quoted formats. (Fixes T113).
This commit is contained in:
parent
97acb71175
commit
20c0394ba2
|
@ -1,3 +1,7 @@
|
||||||
|
2013-05-16 Tom Hacohen
|
||||||
|
|
||||||
|
* Edje textblock: Fixed issue with quoted formats.
|
||||||
|
|
||||||
2013-05-14 Jihoon Kim
|
2013-05-14 Jihoon Kim
|
||||||
|
|
||||||
* Edje entry: return surrounding string until the start position of selection
|
* Edje entry: return surrounding string until the start position of selection
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -270,3 +270,4 @@ Fixes:
|
||||||
* Evas: Fix crash if app use native surface in wrong engine.
|
* Evas: Fix crash if app use native surface in wrong engine.
|
||||||
* Edje entry: return surrounding string until the start position of selection
|
* Edje entry: return surrounding string until the start position of selection
|
||||||
* Ecore-imf: fix crash when ecore_imf_context_del is called in ecore_imf_context_input_panel_callback_call
|
* Ecore-imf: fix crash when ecore_imf_context_del is called in ecore_imf_context_input_panel_callback_call
|
||||||
|
* Edje textblock: Fixed issue with quoted formats.
|
||||||
|
|
|
@ -25,10 +25,10 @@ _edje_format_param_parse(char *item, char **key, char **val)
|
||||||
static char *
|
static char *
|
||||||
_edje_format_parse(const char **s)
|
_edje_format_parse(const char **s)
|
||||||
{
|
{
|
||||||
char *item, *ds;
|
const char *p;
|
||||||
const char *p, *ss;
|
|
||||||
const char *s1 = NULL;
|
const char *s1 = NULL;
|
||||||
const char *s2 = NULL;
|
const char *s2 = NULL;
|
||||||
|
Eina_Bool quote = EINA_FALSE;
|
||||||
|
|
||||||
p = *s;
|
p = *s;
|
||||||
if ((!p) || (*p == 0)) return NULL;
|
if ((!p) || (*p == 0)) return NULL;
|
||||||
|
@ -41,27 +41,26 @@ _edje_format_parse(const char **s)
|
||||||
}
|
}
|
||||||
else if (!s2)
|
else if (!s2)
|
||||||
{
|
{
|
||||||
if ((p > *s) && (p[-1] != '\\'))
|
if (*p == '\'')
|
||||||
|
{
|
||||||
|
quote = !quote;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((p > *s) && (p[-1] != '\\') && (!quote))
|
||||||
{
|
{
|
||||||
if (*p == ' ') s2 = p;
|
if (*p == ' ') s2 = p;
|
||||||
}
|
}
|
||||||
if (*p == 0) s2 = p;
|
if (*p == 0) s2 = p;
|
||||||
}
|
}
|
||||||
p++;
|
p++;
|
||||||
if (s1 && s2)
|
if (s1 && s2 && (s2 > s1))
|
||||||
{
|
{
|
||||||
item = malloc(s2 - s1 + 1);
|
size_t len = s2 - s1;
|
||||||
if (item)
|
char *ret = malloc(len + 1);
|
||||||
{
|
memcpy(ret, s1, len);
|
||||||
for (ds = item, ss = s1; ss < s2; ss++, ds++)
|
ret[len] = '\0';
|
||||||
{
|
|
||||||
if ((*ss == '\\') && (ss < (s2 - 1))) ss++;
|
|
||||||
*ds = *ss;
|
|
||||||
}
|
|
||||||
*ds = 0;
|
|
||||||
}
|
|
||||||
*s = s2;
|
*s = s2;
|
||||||
return item;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*s = p;
|
*s = p;
|
||||||
|
|
Loading…
Reference in New Issue