forked from enlightenment/enventor
syntax_color: reorder the syntax color.
apply comments color prior to tags.
This commit is contained in:
parent
6e911ef3fc
commit
74ff6efbd7
|
@ -893,6 +893,21 @@ color_apply(color_data *cd, const char *src, int length, char *from, char *to)
|
|||
continue;
|
||||
}
|
||||
|
||||
//handle comment: /* ~ */
|
||||
ret = comment_apply(strbuf, &src, length, &cur, &prev, cd->col_comment,
|
||||
&inside_comment);
|
||||
if (ret == 1) continue;
|
||||
else if (ret == -1) goto finished;
|
||||
|
||||
//handle comment: //
|
||||
if (!from || (cur >= from))
|
||||
{
|
||||
ret = comment2_apply(strbuf, &src, length, &cur, &prev,
|
||||
cd->col_comment, &inside_comment);
|
||||
if (ret == 1) continue;
|
||||
else if (ret == -1) goto finished;
|
||||
}
|
||||
|
||||
if (*cur == '<')
|
||||
{
|
||||
//escape EOL: <br/>
|
||||
|
@ -910,21 +925,6 @@ color_apply(color_data *cd, const char *src, int length, char *from, char *to)
|
|||
}
|
||||
}
|
||||
|
||||
//handle comment: /* ~ */
|
||||
ret = comment_apply(strbuf, &src, length, &cur, &prev, cd->col_comment,
|
||||
&inside_comment);
|
||||
if (ret == 1) continue;
|
||||
else if (ret == -1) goto finished;
|
||||
|
||||
//handle comment: //
|
||||
if (!from || (cur >= from))
|
||||
{
|
||||
ret = comment2_apply(strbuf, &src, length, &cur, &prev,
|
||||
cd->col_comment, &inside_comment);
|
||||
if (ret == 1) continue;
|
||||
else if (ret == -1) goto finished;
|
||||
}
|
||||
|
||||
//handle comment: preprocessors, #
|
||||
ret = macro_apply(strbuf, &src, length, &cur, &prev, cd->col_macro, cd);
|
||||
if (ret == 1) continue;
|
||||
|
|
Loading…
Reference in New Issue