[gtksourceview/wip/chergert/snippets] fix $CURRENT_YEAR style variable expansion



commit ac7aee5a3b8f4a52a007a1775c66f22b351c18b6
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jan 28 17:14:55 2020 -0800

    fix $CURRENT_YEAR style variable expansion

 gtksourceview/gtksourcesnippetbundle-parser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/gtksourcesnippetbundle-parser.c b/gtksourceview/gtksourcesnippetbundle-parser.c
index 86e79ada..62c02f7f 100644
--- a/gtksourceview/gtksourcesnippetbundle-parser.c
+++ b/gtksourceview/gtksourcesnippetbundle-parser.c
@@ -158,13 +158,13 @@ parse_variable (const gchar  *line,
 
                line = end;
        }
-       else if (g_ascii_isalpha (*line))
+       else if (g_ascii_isalpha (*line) || *line == '_')
        {
                const gchar *cur;
 
                for (cur = line; *cur; cur++)
                {
-                       if (g_ascii_isalnum (*cur))
+                       if (g_ascii_isalnum (*cur) || *cur == '_')
                                continue;
                        break;
                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]