diff options
Diffstat (limited to 'nikola/plugins/compile_rest/youtube.py')
| -rw-r--r-- | nikola/plugins/compile_rest/youtube.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nikola/plugins/compile_rest/youtube.py b/nikola/plugins/compile_rest/youtube.py index fe3b28b..30ac000 100644 --- a/nikola/plugins/compile_rest/youtube.py +++ b/nikola/plugins/compile_rest/youtube.py @@ -26,9 +26,9 @@ from docutils import nodes from docutils.parsers.rst import directives CODE = """\ -<iframe width="%(width)s" -height="%(height)s" -src="http://www.youtube.com/embed/%(yid)s?rel=0&hd=1&wmode=transparent" +<iframe width="{width}" +height="{height}" +src="http://www.youtube.com/embed/{yid}?rel=0&hd=1&wmode=transparent" ></iframe>""" @@ -51,6 +51,6 @@ def youtube(name, args, options, content, lineno, string_vars['width'] = extra_args.pop('width') if 'height' in extra_args: string_vars['height'] = extra_args.pop('height') - return [nodes.raw('', CODE % (string_vars), format='html')] + return [nodes.raw('', CODE.format(**string_vars), format='html')] youtube.content = True directives.register_directive('youtube', youtube) |
