regexps: Accomodate for source indicator inside the heading

This commit is contained in:
Tomas Babej 2015-04-05 23:36:05 +02:00
parent 961d405107
commit cbe88d9623

View file

@ -53,11 +53,14 @@ GENERIC_VIEWPORT = re.compile(
'[=]+' # Heading begging '[=]+' # Heading begging
'(?P<name>[^=\|]*)' # Name of the viewport, all before the | sign '(?P<name>[^=\|]*)' # Name of the viewport, all before the | sign
'\|' # Colon '\|' # Colon
'(?P<filter>[^=\|]*)' # Filter '(?P<filter>[^=#\|]*)' # Filter
'(' # Optional defaults '(' # Optional defaults
'\|' # Colon '\|' # Colon
'(?P<defaults>[^=\|]*)' # Default attrs '(?P<defaults>[^=#\|]*)' # Default attrs
')?' ')?'
'\s*' # Any whitespace
'(#(?P<source>[A-Z]))?' # Optional source indicator
'\s*' # Any whitespace
'[=]+' # Header ending '[=]+' # Header ending
) )