hermet pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=74ff6efbd7cacdaad8081957ef29834704c4b2d2

commit 74ff6efbd7cacdaad8081957ef29834704c4b2d2
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Thu Jul 9 22:48:16 2015 +0900

    syntax_color: reorder the syntax color.
    
    apply comments color prior to tags.
---
 src/lib/syntax_color.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/lib/syntax_color.c b/src/lib/syntax_color.c
index f407ccf..33fc25d 100644
--- a/src/lib/syntax_color.c
+++ b/src/lib/syntax_color.c
@@ -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;

-- 


Reply via email to