edc_parser: Fix to show double quotation marks(")
Change the markup for double quotation marks from "\"" to """.
This commit is contained in:
parent
aeb4bcda16
commit
af1dc2f23d
|
@ -68,7 +68,7 @@ group_name_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED)
|
||||||
while (p <= end)
|
while (p <= end)
|
||||||
{
|
{
|
||||||
//Skip "" range
|
//Skip "" range
|
||||||
if (*p == *quot)
|
if (!strncmp(p, quot, quot_len))
|
||||||
{
|
{
|
||||||
p += quot_len;
|
p += quot_len;
|
||||||
p = strstr(p, quot);
|
p = strstr(p, quot);
|
||||||
|
@ -146,7 +146,7 @@ cur_name_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED)
|
||||||
while (p <= end)
|
while (p <= end)
|
||||||
{
|
{
|
||||||
//Skip "" range
|
//Skip "" range
|
||||||
if (*p == *quot)
|
if (!strncmp(p, quot, quot_len))
|
||||||
{
|
{
|
||||||
p += quot_len;
|
p += quot_len;
|
||||||
p = strstr(p, quot);
|
p = strstr(p, quot);
|
||||||
|
@ -851,6 +851,7 @@ group_beginning_pos_get(const char* source, const char *group_name)
|
||||||
{
|
{
|
||||||
const char* GROUP_SYNTAX_NAME = "group";
|
const char* GROUP_SYNTAX_NAME = "group";
|
||||||
const char *quot = QUOT;
|
const char *quot = QUOT;
|
||||||
|
const int quot_len = QUOT_LEN;
|
||||||
|
|
||||||
const char *pos = strstr(source, GROUP_SYNTAX_NAME);
|
const char *pos = strstr(source, GROUP_SYNTAX_NAME);
|
||||||
|
|
||||||
|
@ -859,7 +860,8 @@ group_beginning_pos_get(const char* source, const char *group_name)
|
||||||
{
|
{
|
||||||
const char *name = strstr(pos, quot);
|
const char *name = strstr(pos, quot);
|
||||||
if (!name) return NULL;
|
if (!name) return NULL;
|
||||||
pos = strstr(++name, quot);
|
name += quot_len;
|
||||||
|
pos = strstr(name, quot);
|
||||||
if (!pos) return NULL;
|
if (!pos) return NULL;
|
||||||
if (!strncmp(name, group_name, strlen(group_name)))
|
if (!strncmp(name, group_name, strlen(group_name)))
|
||||||
return pos;
|
return pos;
|
||||||
|
@ -1054,7 +1056,7 @@ parser_paragh_name_get(parser_data *pd EINA_UNUSED, Evas_Object *entry)
|
||||||
while (cur <= end)
|
while (cur <= end)
|
||||||
{
|
{
|
||||||
//Skip "" range
|
//Skip "" range
|
||||||
if (*cur == *quot)
|
if (!strncmp(cur, quot, quot_len))
|
||||||
{
|
{
|
||||||
cur += quot_len;
|
cur += quot_len;
|
||||||
cur = strstr(cur, quot);
|
cur = strstr(cur, quot);
|
||||||
|
@ -1118,7 +1120,7 @@ parser_cur_name_fast_get(Evas_Object *entry, const char *scope)
|
||||||
while (p <= end)
|
while (p <= end)
|
||||||
{
|
{
|
||||||
//Skip "" range
|
//Skip "" range
|
||||||
if (*p == *quot)
|
if (!strncmp(p, quot, quot_len))
|
||||||
{
|
{
|
||||||
p += quot_len;
|
p += quot_len;
|
||||||
p = strstr(p, quot);
|
p = strstr(p, quot);
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
#ifndef __ENVENTOR_PRIVATE_H__
|
#ifndef __ENVENTOR_PRIVATE_H__
|
||||||
#define __ENVENTOR_PRIVATE_H__
|
#define __ENVENTOR_PRIVATE_H__
|
||||||
|
|
||||||
#define QUOT "\""
|
#define QUOT """
|
||||||
#define QUOT_C '\"'
|
#define QUOT_LEN 6
|
||||||
#define QUOT_LEN 1
|
|
||||||
#define EOL "<br/>"
|
#define EOL "<br/>"
|
||||||
#define EOL_LEN 5
|
#define EOL_LEN 5
|
||||||
#define TAB "<tab/>"
|
#define TAB "<tab/>"
|
||||||
|
|
|
@ -386,25 +386,20 @@ string_apply(Eina_Strbuf *strbuf, char **cur, char **prev,
|
||||||
const Eina_Stringshare *col, Eina_Bool inside_string)
|
const Eina_Stringshare *col, Eina_Bool inside_string)
|
||||||
{
|
{
|
||||||
//escape string: " ~ "
|
//escape string: " ~ "
|
||||||
if ((*cur)[0] != QUOT_C) return 0;
|
if (strncmp(*cur, QUOT, QUOT_LEN)) return 0;
|
||||||
|
|
||||||
char buf[128];
|
char buf[128];
|
||||||
|
|
||||||
if (!inside_string)
|
|
||||||
{
|
|
||||||
snprintf(buf, sizeof(buf), "<color=#%s>", col);
|
|
||||||
eina_strbuf_append(strbuf, buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
eina_strbuf_append_length(strbuf, *prev, (*cur - *prev) + 1);
|
eina_strbuf_append_length(strbuf, *prev, (*cur - *prev) + 1);
|
||||||
|
|
||||||
if (inside_string)
|
if (!inside_string)
|
||||||
{
|
snprintf(buf, sizeof(buf), "<color=#%s>%s", col, QUOT);
|
||||||
snprintf(buf, sizeof(buf), "</color>");
|
else
|
||||||
eina_strbuf_append(strbuf, buf);
|
snprintf(buf, sizeof(buf), "%s</color>", QUOT);
|
||||||
}
|
|
||||||
|
|
||||||
(*cur)++;
|
eina_strbuf_append(strbuf, buf);
|
||||||
|
|
||||||
|
*cur += QUOT_LEN;
|
||||||
*prev = *cur;
|
*prev = *cur;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue