1.1 --- a/moinformat/parsers/common.py Tue Aug 07 17:07:03 2018 +0200
1.2 +++ b/moinformat/parsers/common.py Tue Aug 07 23:45:24 2018 +0200
1.3 @@ -27,6 +27,7 @@
1.4
1.5 ws_excl_nl = r"[ \f\r\t\v]"
1.6 quotes = "['" '"]' # ['"]
1.7 +dotall = r"(.|\n)"
1.8
1.9 def choice(l):
1.10
1.11 @@ -80,6 +81,7 @@
1.12 Define patterns for the regular expressions in the 'syntax' mapping. In each
1.13 pattern, replace...
1.14
1.15 + \E with a pattern for matching all characters including newlines
1.16 \N with a pattern for matching whitespace excluding newlines
1.17 \Q with a pattern for matching quotation marks
1.18
1.19 @@ -91,6 +93,7 @@
1.20 for name, value in syntax.items():
1.21 value = value.replace(r"\N", ws_excl_nl)
1.22 value = value.replace(r"\Q", quotes)
1.23 + value = value.replace(r"\E", dotall)
1.24
1.25 # Add the name to group names as a prefix.
1.26