Sfoglia il codice sorgente

change regex to support width & height in percents

snay 8 anni fa
parent
commit
9dea9b285b
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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')