[gnome-builder] todo: improve filesystem match regex



commit f5a9a341210e9d077de6f846ae815d672e69c24d
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jun 25 15:44:55 2018 -0700

    todo: improve filesystem match regex
    
    We can't be perfect with regexes here, but we can be more greedy. Anything
    that doesn't match these rules will likely be uninteresting anyway.

 src/plugins/todo/gbp-todo-model.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/todo/gbp-todo-model.c b/src/plugins/todo/gbp-todo-model.c
index d82539adf..bc9011d06 100644
--- a/src/plugins/todo/gbp-todo-model.c
+++ b/src/plugins/todo/gbp-todo-model.c
@@ -255,11 +255,11 @@ gbp_todo_model_class_init (GbpTodoModelClass *klass)
 
   g_object_class_install_properties (object_class, N_PROPS, properties);
 
-  line1 = g_regex_new ("(.*):(\\d+):(.*)", 0, 0, &error);
+  line1 = g_regex_new ("([a-zA-Z0-9\\+\\-\\.\\/_]+):(\\d+):(.*)", 0, 0, &error);
   g_assert_no_error (error);
   g_assert (line1 != NULL);
 
-  line2 = g_regex_new ("(.*)-(\\d+)-(.*)", 0, 0, &error);
+  line2 = g_regex_new ("([a-zA-Z0-9\\+\\-\\.\\/_]+)-(\\d+)-(.*)", 0, 0, &error);
   g_assert_no_error (error);
   g_assert (line2 != NULL);
 }


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