Change the regex to allow only numbers

This commit is contained in:
Calzzetta 2014-02-24 07:09:29 -03:00 committed by Juda Kaleta
parent 765d1b2904
commit cebffa60da

View file

@ -48,7 +48,7 @@ class VideoNode(Node):
error_msg = 'Syntax error. Expected: ``{% video URL ... %}``'
default_size = 'small'
re_size = re.compile('(?P<width>\w+[%]?)x(?P<height>\w+[%]?)')
re_size = re.compile('(?P<width>\d+[%]?)x(?P<height>\d+[%]?)')
def __init__(self, parser, token):
self.size = None