conf: Match more characters in _ and **
authorTobias Brunner <tobias@strongswan.org>
Wed, 2 Aug 2017 12:32:32 +0000 (14:32 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 7 Aug 2017 12:22:27 +0000 (14:22 +0200)
\w does not match e.g. / but \S does.

conf/format-options.py

index 9531378..592bf67 100755 (executable)
@@ -217,7 +217,7 @@ class TagReplacer:
                return re.compile(r'''
                        (^|\s|(?P<brack>[(\[])) # prefix with optional opening bracket
                        (?P<tag>''' + tag + r''') # start tag
-                       (?P<text>\w|\S.*?\S) # text
+                       (?P<text>\S|\S.*?\S) # text
                        ''' + tag + r''' # end tag
                        (?P<punct>([.,!:)\]]|\(\d+\))*) # punctuation
                        (?=$|\s) # suffix (don't consume it so that subsequent tags can match)