Commits

David Cramer committed 9ec26ad

Support - in youtube video urls

Comments (0)

Files changed (1)

bbcode/bbtags/web.py

     
     Usage:
     
-    [code lang=bbdocs linenos=0][youtube]http://www.youtube.com/watch?v=FjPf6B8EVJI[/youtube][/code]
+    [code lang=bbdocs linenos=0][youtube]http://www.youtube.com/watch?v=FjPf6-B8EVJI[/youtube][/code]
     """
-    _video_id_pattern = re.compile('v=(\w+)')
+    _video_id_pattern = re.compile('v=([\w\-]+)')
     open_pattern = re.compile(patterns.no_argument % 'youtube', re.I)
     close_pattern = re.compile(patterns.closing % 'youtube', re.I)