[latexila/gnome-3-22] DocumentStructure: fix bug in regex to extract TODO and FIXME comments



commit 5f70db032adb7fc796d8d75701c7495395f8c797
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Mar 4 12:54:02 2017 +0100

    DocumentStructure: fix bug in regex to extract TODO and FIXME comments
    
    Allow "TODO: ..." and "FIXME: ...".
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779473

 src/document_structure.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/document_structure.vala b/src/document_structure.vala
index 679a09c..be953fc 100644
--- a/src/document_structure.vala
+++ b/src/document_structure.vala
@@ -72,7 +72,7 @@ public class DocumentStructure : GLib.Object
         {
             _chars_regex = new Regex ("\\\\|%");
 
-            _comment_regex = new Regex ("^(?P<type>TODO|FIXME)\\s+:?\\s*(?P<text>.*)$",
+            _comment_regex = new Regex ("^(?P<type>TODO|FIXME)\\s*:?\\s*(?P<text>.*)$",
                 RegexCompileFlags.OPTIMIZE);
 
             // Stop at the first argument, which can be optional (a '[').


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