regexp: Require non-empty filter and defaults matches in the viewport

This commit is contained in:
Tomas Babej 2016-05-23 22:32:18 +02:00
parent 29446329c8
commit 07cbe55c72

View file

@ -47,10 +47,10 @@ GENERIC_VIEWPORT = re.compile(
'(?P<name>[^=\|\[\{]*)' # Name of the viewport, all before the | sign
# Cannot include '[', '=', '|, and '{'
'\|' # Colon
'(?P<filter>[^=\|]*?)' # Filter
'(?P<filter>[^=\|]+?)' # Filter
'(' # Optional defaults
'\|' # Colon
'(?P<defaults>[^=\|]*?)' # Default attrs
'(?P<defaults>[^=\|]+?)' # Default attrs
')?'
'\s*' # Any whitespace
'(#(?P<source>[A-Z]))?' # Optional source indicator