prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Responsive youtube embed
  I'm trying to set an embedded youtube link to 100% width in a .rst file. Is this possible?
  
  I've tried:
  
  ```
  .. youtube:: 3XsQCkF1SrE
     :align: center
     :width: 100%
  ```
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `nikola/plugins/compile/rest/youtube.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 
  3 # Copyright © 2012-2018 Roberto Alsina and others.
  4 
  5 # Permission is hereby granted, free of charge, to any
  6 # person obtaining a copy of this software and associated
  7 # documentation files (the "Software"), to deal in the
  8 # Software without restriction, including without limitation
  9 # the rights to use, copy, modify, merge, publish,
  10 # distribute, sublicense, and/or sell copies of the
  11 # Software, and to permit persons to whom the Software is
  12 # furnished to do so, subject to the following conditions:
  13 #
  14 # The above copyright notice and this permission notice
  15 # shall be included in all copies or substantial portions of
  16 # the Software.
  17 #
  18 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
  19 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  20 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  21 # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
  22 # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  23 # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  24 # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  25 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  26 
  27 """YouTube directive for reStructuredText."""
  28 
  29 from docutils import nodes
  30 from docutils.parsers.rst import Directive, directives
  31 from nikola.plugins.compile.rest import _align_choice, _align_options_base
  32 
  33 from nikola.plugin_categories import RestExtension
  34 
  35 
  36 class Plugin(RestExtension):
  37     """Plugin for the youtube directive."""
  38 
  39     name = "rest_youtube"
  40 
  41     def set_site(self, site):
  42         """Set Nikola site."""
  43         self.site = site
  44         directives.register_directive('youtube', Youtube)
  45         return super(Plugin, self).set_site(site)
  46 
  47 
  48 CODE = """\
  49 <div class="youtube-video{align}">
  50 <iframe width="{width}" height="{height}"
  51 src="https://www.youtube-nocookie.com/embed/{yid}?rel=0&wmode=transparent"
  52 frameborder="0" allow="encrypted-media" allowfullscreen
  53 ></iframe>
  54 </div>"""
  55 
  56 
  57 class Youtube(Directive):
  58     """reST extension for inserting youtube embedded videos.
  59 
  60     Usage:
  61         .. youtube:: lyViVmaBQDg
  62            :height: 400
  63            :width: 600
  64 
  65     """
  66 
  67     has_content = True
  68     required_arguments = 1
  69     option_spec = {
  70         "width": directives.positive_int,
  71         "height": directives.positive_int,
  72         "align": _align_choice
  73     }
  74 
  75     def run(self):
  76         """Run the youtube directive."""
  77         self.check_content()
  78         options = {
  79             'yid': self.arguments[0],
  80             'width': 560,
  81             'height': 315,
  82         }
  83         options.update(self.options)
  84         if self.options.get('align') in _align_options_base:
  85             options['align'] = ' align-' + self.options['align']
  86         else:
  87             options['align'] = ''
  88         return [nodes.raw('', CODE.format(**options), format='html')]
  89 
  90     def check_content(self):
  91         """Check if content exists."""
  92         if self.content:  # pragma: no cover
  93             raise self.warning("This directive does not accept content. The "
  94                                "'key=value' format for options is deprecated, "
  95                                "use ':key: value' instead")
  96
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/nikola/plugins/compile/rest/youtube.py b/nikola/plugins/compile/rest/youtube.py
  --- a/nikola/plugins/compile/rest/youtube.py
  +++ b/nikola/plugins/compile/rest/youtube.py
  @@ -67,8 +67,8 @@
       has_content = True
       required_arguments = 1
       option_spec = {
  -        "width": directives.positive_int,
  -        "height": directives.positive_int,
  +        "width": directives.unchanged,
  +        "height": directives.unchanged,
           "align": _align_choice
       }
   
  @@ -80,7 +80,7 @@
               'width': 560,
               'height': 315,
           }
  -        options.update(self.options)
  +        options.update({k: v for k, v in self.options.items() if v})
           if self.options.get('align') in _align_options_base:
               options['align'] = ' align-' + self.options['align']
           else:
  
verification_info: {"golden_diff": "diff --git a/nikola/plugins/compile/rest/youtube.py b/nikola/plugins/compile/rest/youtube.py\n--- a/nikola/plugins/compile/rest/youtube.py\n+++ b/nikola/plugins/compile/rest/youtube.py\n@@ -67,8 +67,8 @@\n     has_content = True\n     required_arguments = 1\n     option_spec = {\n-        \"width\": directives.positive_int,\n-        \"height\": directives.positive_int,\n+        \"width\": directives.unchanged,\n+        \"height\": directives.unchanged,\n         \"align\": _align_choice\n     }\n \n@@ -80,7 +80,7 @@\n             'width': 560,\n             'height': 315,\n         }\n-        options.update(self.options)\n+        options.update({k: v for k, v in self.options.items() if v})\n         if self.options.get('align') in _align_options_base:\n             options['align'] = ' align-' + self.options['align']\n         else:\n", "issue": "Responsive youtube embed\nI'm trying to set an embedded youtube link to 100% width in a .rst file. Is this possible?\r\n\r\nI've tried:\r\n\r\n```\r\n.. youtube:: 3XsQCkF1SrE\r\n   :align: center\r\n   :width: 100%\r\n```\r\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright \u00a9 2012-2018 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including without limitation\n# the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the\n# Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice\n# shall be included in all copies or substantial portions of\n# the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY\n# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\n# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\n# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\n# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\"\"\"YouTube directive for reStructuredText.\"\"\"\n\nfrom docutils import nodes\nfrom docutils.parsers.rst import Directive, directives\nfrom nikola.plugins.compile.rest import _align_choice, _align_options_base\n\nfrom nikola.plugin_categories import RestExtension\n\n\nclass Plugin(RestExtension):\n    \"\"\"Plugin for the youtube directive.\"\"\"\n\n    name = \"rest_youtube\"\n\n    def set_site(self, site):\n        \"\"\"Set Nikola site.\"\"\"\n        self.site = site\n        directives.register_directive('youtube', Youtube)\n        return super(Plugin, self).set_site(site)\n\n\nCODE = \"\"\"\\\n<div class=\"youtube-video{align}\">\n<iframe width=\"{width}\" height=\"{height}\"\nsrc=\"https://www.youtube-nocookie.com/embed/{yid}?rel=0&wmode=transparent\"\nframeborder=\"0\" allow=\"encrypted-media\" allowfullscreen\n></iframe>\n</div>\"\"\"\n\n\nclass Youtube(Directive):\n    \"\"\"reST extension for inserting youtube embedded videos.\n\n    Usage:\n        .. youtube:: lyViVmaBQDg\n           :height: 400\n           :width: 600\n\n    \"\"\"\n\n    has_content = True\n    required_arguments = 1\n    option_spec = {\n        \"width\": directives.positive_int,\n        \"height\": directives.positive_int,\n        \"align\": _align_choice\n    }\n\n    def run(self):\n        \"\"\"Run the youtube directive.\"\"\"\n        self.check_content()\n        options = {\n            'yid': self.arguments[0],\n            'width': 560,\n            'height': 315,\n        }\n        options.update(self.options)\n        if self.options.get('align') in _align_options_base:\n            options['align'] = ' align-' + self.options['align']\n        else:\n            options['align'] = ''\n        return [nodes.raw('', CODE.format(**options), format='html')]\n\n    def check_content(self):\n        \"\"\"Check if content exists.\"\"\"\n        if self.content:  # pragma: no cover\n            raise self.warning(\"This directive does not accept content. The \"\n                               \"'key=value' format for options is deprecated, \"\n                               \"use ':key: value' instead\")\n", "path": "nikola/plugins/compile/rest/youtube.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright \u00a9 2012-2018 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including without limitation\n# the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the\n# Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice\n# shall be included in all copies or substantial portions of\n# the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY\n# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\n# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\n# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\n# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\"\"\"YouTube directive for reStructuredText.\"\"\"\n\nfrom docutils import nodes\nfrom docutils.parsers.rst import Directive, directives\nfrom nikola.plugins.compile.rest import _align_choice, _align_options_base\n\nfrom nikola.plugin_categories import RestExtension\n\n\nclass Plugin(RestExtension):\n    \"\"\"Plugin for the youtube directive.\"\"\"\n\n    name = \"rest_youtube\"\n\n    def set_site(self, site):\n        \"\"\"Set Nikola site.\"\"\"\n        self.site = site\n        directives.register_directive('youtube', Youtube)\n        return super(Plugin, self).set_site(site)\n\n\nCODE = \"\"\"\\\n<div class=\"youtube-video{align}\">\n<iframe width=\"{width}\" height=\"{height}\"\nsrc=\"https://www.youtube-nocookie.com/embed/{yid}?rel=0&wmode=transparent\"\nframeborder=\"0\" allow=\"encrypted-media\" allowfullscreen\n></iframe>\n</div>\"\"\"\n\n\nclass Youtube(Directive):\n    \"\"\"reST extension for inserting youtube embedded videos.\n\n    Usage:\n        .. youtube:: lyViVmaBQDg\n           :height: 400\n           :width: 600\n\n    \"\"\"\n\n    has_content = True\n    required_arguments = 1\n    option_spec = {\n        \"width\": directives.unchanged,\n        \"height\": directives.unchanged,\n        \"align\": _align_choice\n    }\n\n    def run(self):\n        \"\"\"Run the youtube directive.\"\"\"\n        self.check_content()\n        options = {\n            'yid': self.arguments[0],\n            'width': 560,\n            'height': 315,\n        }\n        options.update({k: v for k, v in self.options.items() if v})\n        if self.options.get('align') in _align_options_base:\n            options['align'] = ' align-' + self.options['align']\n        else:\n            options['align'] = ''\n        return [nodes.raw('', CODE.format(**options), format='html')]\n\n    def check_content(self):\n        \"\"\"Check if content exists.\"\"\"\n        if self.content:  # pragma: no cover\n            raise self.warning(\"This directive does not accept content. The \"\n                               \"'key=value' format for options is deprecated, \"\n                               \"use ':key: value' instead\")\n", "path": "nikola/plugins/compile/rest/youtube.py"}]}