Explorar el Código

Merge pull request #707 from snay/master

liquid_tags.youtube: change regex to support width & height in percents
Justin Mayer hace 8 años
padre
commit
36bf42fc6e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      liquid_tags/youtube.py

+ 1 - 1
liquid_tags/youtube.py

@@ -26,7 +26,7 @@ from .mdx_liquid_tags import LiquidTags
 
 SYNTAX = "{% youtube id [width height] %}"
 
-YOUTUBE = re.compile(r'([\S]+)(\s+(\d+)\s(\d+))?')
+YOUTUBE = re.compile(r'([\S]+)(\s+([\d%]+)\s([\d%]+))?')
 
 
 @LiquidTags.register('youtube')