edc_parser: Fix to enable inserting templates by live edit.
The problem that template is not inserted by live edit was caused by the wrong double quotation marks parser. The double quotation marks are written as ""e;" in entry markup format and they are written as "\"" in utf8 format. Previously, only ""e;" was used to parse double quotation marks. Now, ""e;" is used in entry markup format and "\"" is used in utf8 format to parse double quotation marks.
This commit is contained in:
parent
b14f106bf7
commit
fe48ac5af7
|
@ -50,9 +50,9 @@ typedef struct type_init_thread_data_s
|
||||||
static void
|
static void
|
||||||
group_name_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED)
|
group_name_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED)
|
||||||
{
|
{
|
||||||
const char *quot = QUOT;
|
const char *quot = QUOT_UTF8;
|
||||||
const char *group = "group";
|
const char *group = "group";
|
||||||
const int quot_len = QUOT_LEN;
|
const int quot_len = QUOT_UTF8_LEN;
|
||||||
const int group_len = 5; //strlen("group");
|
const int group_len = 5; //strlen("group");
|
||||||
|
|
||||||
cur_name_td *td = data;
|
cur_name_td *td = data;
|
||||||
|
@ -122,11 +122,11 @@ end:
|
||||||
static void
|
static void
|
||||||
cur_name_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED)
|
cur_name_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED)
|
||||||
{
|
{
|
||||||
const char *quot = QUOT;
|
const char *quot = QUOT_UTF8;
|
||||||
const char *part = "part";
|
const char *part = "part";
|
||||||
const char *parts = "parts";
|
const char *parts = "parts";
|
||||||
const char *group = "group";
|
const char *group = "group";
|
||||||
const int quot_len = QUOT_LEN;
|
const int quot_len = QUOT_UTF8_LEN;
|
||||||
const int part_len = 4; //strlen("part");
|
const int part_len = 4; //strlen("part");
|
||||||
const int parts_len = 5; //strlen("parts");
|
const int parts_len = 5; //strlen("parts");
|
||||||
const int group_len = 5; //strlen("group");
|
const int group_len = 5; //strlen("group");
|
||||||
|
@ -850,8 +850,8 @@ static const char *
|
||||||
group_beginning_pos_get(const char* source, const char *group_name)
|
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_UTF8;
|
||||||
const int quot_len = QUOT_LEN;
|
const int quot_len = QUOT_UTF8_LEN;
|
||||||
|
|
||||||
const char *pos = strstr(source, GROUP_SYNTAX_NAME);
|
const char *pos = strstr(source, GROUP_SYNTAX_NAME);
|
||||||
|
|
||||||
|
@ -1045,8 +1045,8 @@ parser_paragh_name_get(parser_data *pd EINA_UNUSED, Evas_Object *entry)
|
||||||
int cur_pos = elm_entry_cursor_pos_get(entry);
|
int cur_pos = elm_entry_cursor_pos_get(entry);
|
||||||
if (cur_pos < 1) return NULL;
|
if (cur_pos < 1) return NULL;
|
||||||
|
|
||||||
const char *quot = QUOT;
|
const char *quot = QUOT_UTF8;
|
||||||
int quot_len = QUOT_LEN;
|
int quot_len = QUOT_UTF8_LEN;
|
||||||
char *cur = utf8;
|
char *cur = utf8;
|
||||||
char *end = cur + cur_pos;
|
char *end = cur + cur_pos;
|
||||||
char *stack[20];
|
char *stack[20];
|
||||||
|
@ -1098,8 +1098,8 @@ parser_paragh_name_get(parser_data *pd EINA_UNUSED, Evas_Object *entry)
|
||||||
Eina_Stringshare*
|
Eina_Stringshare*
|
||||||
parser_cur_name_fast_get(Evas_Object *entry, const char *scope)
|
parser_cur_name_fast_get(Evas_Object *entry, const char *scope)
|
||||||
{
|
{
|
||||||
const char *quot = QUOT;
|
const char *quot = QUOT_UTF8;
|
||||||
const int quot_len = QUOT_LEN;
|
const int quot_len = QUOT_UTF8_LEN;
|
||||||
const int scope_len = strlen(scope);
|
const int scope_len = strlen(scope);
|
||||||
|
|
||||||
const char *text = elm_entry_entry_get(entry);
|
const char *text = elm_entry_entry_get(entry);
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
#define QUOT """
|
#define QUOT """
|
||||||
#define QUOT_LEN 6
|
#define QUOT_LEN 6
|
||||||
|
#define QUOT_UTF8 "\""
|
||||||
|
#define QUOT_UTF8_LEN 1
|
||||||
#define EOL "<br/>"
|
#define EOL "<br/>"
|
||||||
#define EOL_LEN 5
|
#define EOL_LEN 5
|
||||||
#define TAB "<tab/>"
|
#define TAB "<tab/>"
|
||||||
|
|
Loading…
Reference in New Issue