1.1 --- a/moinformat/parsers/common.py Tue Jul 31 21:39:35 2018 +0200
1.2 +++ b/moinformat/parsers/common.py Wed Aug 01 16:50:29 2018 +0200
1.3 @@ -28,6 +28,12 @@
1.4 ws_excl_nl = r"[ \f\r\t\v]"
1.5 quotes = "['" '"]' # ['"]
1.6
1.7 +def choice(l):
1.8 +
1.9 + "Return a pattern matching a choice of patterns in 'l'."
1.10 +
1.11 + return "(%s)" % "|".join(l)
1.12 +
1.13 def excl(s):
1.14
1.15 "Return a non-matching pattern for 's'."
1.16 @@ -409,7 +415,8 @@
1.17 """
1.18
1.19 if self.read_until(["header"], False) == "": # None means no header
1.20 - region.type = self.match_group("args")
1.21 + region.args = self.match_group("args")
1.22 + region.type = region.args.split(" ", 1)[0]
1.23
1.24 # Parsing utilities.
1.25