prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Case mismatch for fragment identifiers between menus and page heading anchor
  ### Describe the issue
  
  The menu item "Groups / Ops and Management" sends you off to https://datatracker.ietf.org/wg/#ops but "#ops" is not recognised on the page because the heading anchor is "#OPS" and so that menu item takes you to the top of the page not the Ops heading.
  
  ### Code of Conduct
  
  - [X] I agree to follow the [IETF's Code of Conduct](https://github.com/ietf-tools/.github/blob/main/CODE_OF_CONDUCT.md)
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `ietf/doc/templatetags/wg_menu.py`
  Content:
  ```
  1 # Copyright The IETF Trust 2009-2022, All Rights Reserved
  2 
  3 # Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
  4 # All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
  5 #
  6 # Redistribution and use in source and binary forms, with or without
  7 # modification, are permitted provided that the following conditions
  8 # are met:
  9 #
  10 #  * Redistributions of source code must retain the above copyright
  11 #    notice, this list of conditions and the following disclaimer.
  12 #
  13 #  * Redistributions in binary form must reproduce the above
  14 #    copyright notice, this list of conditions and the following
  15 #    disclaimer in the documentation and/or other materials provided
  16 #    with the distribution.
  17 #
  18 #  * Neither the name of the Nokia Corporation and/or its
  19 #    subsidiary(-ies) nor the names of its contributors may be used
  20 #    to endorse or promote products derived from this software
  21 #    without specific prior written permission.
  22 #
  23 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  24 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  25 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  26 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  27 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  28 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  29 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  30 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  31 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  32 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  33 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  34 
  35 from django import template
  36 from django.template.loader import render_to_string
  37 from django.db import models
  38 
  39 from ietf.group.models import Group
  40 
  41 register = template.Library()
  42 
  43 parent_short_names = {
  44     "ops": "Ops & Management",
  45     "rai": "RAI",
  46     "iab": "IAB",
  47     "art": "Apps & Realtime",
  48     "ietfadminllc": "IETF LLC",
  49 }
  50 
  51 parents = Group.objects.filter(
  52     models.Q(type="area")
  53     | models.Q(type="irtf", acronym="irtf")
  54     | models.Q(acronym="iab")
  55     | models.Q(acronym="ietfadminllc")
  56     | models.Q(acronym="rfceditor"),
  57     state="active",
  58 ).order_by("type__order", "type_id", "acronym")
  59 
  60 
  61 @register.simple_tag
  62 def wg_menu(flavor):
  63     global parents
  64 
  65     for p in parents:
  66         p.short_name = parent_short_names.get(p.acronym) or p.name
  67         if p.short_name.endswith(" Area"):
  68             p.short_name = p.short_name[: -len(" Area")]
  69 
  70         if p.type_id == "area":
  71             p.menu_url = "/wg/#" + p.acronym
  72         elif p.acronym == "irtf":
  73             p.menu_url = "/rg/"
  74         elif p.acronym == "iab":
  75             p.menu_url = "/program/"
  76         elif p.acronym == "ietfadminllc":
  77             p.menu_url = "/adm/"
  78         elif p.acronym == "rfceditor":
  79             p.menu_url = "/rfcedtyp/"
  80 
  81     return render_to_string(
  82         "base/menu_wg.html", {"parents": parents, "flavor": flavor}
  83     )
  84
  ```
  --- 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/ietf/doc/templatetags/wg_menu.py b/ietf/doc/templatetags/wg_menu.py
  --- a/ietf/doc/templatetags/wg_menu.py
  +++ b/ietf/doc/templatetags/wg_menu.py
  @@ -1,4 +1,4 @@
  -# Copyright The IETF Trust 2009-2022, All Rights Reserved
  +# Copyright The IETF Trust 2009-2023, All Rights Reserved
   
   # Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
   # All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
  @@ -32,6 +32,8 @@
   # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   
  +import debug    # pyflakes: ignore
  +
   from django import template
   from django.template.loader import render_to_string
   from django.db import models
  @@ -68,7 +70,7 @@
               p.short_name = p.short_name[: -len(" Area")]
   
           if p.type_id == "area":
  -            p.menu_url = "/wg/#" + p.acronym
  +            p.menu_url = "/wg/#" + p.acronym.upper()
           elif p.acronym == "irtf":
               p.menu_url = "/rg/"
           elif p.acronym == "iab":
  
verification_info: {"golden_diff": "diff --git a/ietf/doc/templatetags/wg_menu.py b/ietf/doc/templatetags/wg_menu.py\n--- a/ietf/doc/templatetags/wg_menu.py\n+++ b/ietf/doc/templatetags/wg_menu.py\n@@ -1,4 +1,4 @@\n-# Copyright The IETF Trust 2009-2022, All Rights Reserved\n+# Copyright The IETF Trust 2009-2023, All Rights Reserved\n \n # Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).\n # All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>\n@@ -32,6 +32,8 @@\n # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n \n+import debug    # pyflakes: ignore\n+\n from django import template\n from django.template.loader import render_to_string\n from django.db import models\n@@ -68,7 +70,7 @@\n             p.short_name = p.short_name[: -len(\" Area\")]\n \n         if p.type_id == \"area\":\n-            p.menu_url = \"/wg/#\" + p.acronym\n+            p.menu_url = \"/wg/#\" + p.acronym.upper()\n         elif p.acronym == \"irtf\":\n             p.menu_url = \"/rg/\"\n         elif p.acronym == \"iab\":\n", "issue": "Case mismatch for fragment identifiers between menus and page heading anchor\n### Describe the issue\n\nThe menu item \"Groups / Ops and Management\" sends you off to https://datatracker.ietf.org/wg/#ops but \"#ops\" is not recognised on the page because the heading anchor is \"#OPS\" and so that menu item takes you to the top of the page not the Ops heading.\n\n### Code of Conduct\n\n- [X] I agree to follow the [IETF's Code of Conduct](https://github.com/ietf-tools/.github/blob/main/CODE_OF_CONDUCT.md)\n", "before_files": [{"content": "# Copyright The IETF Trust 2009-2022, All Rights Reserved\n\n# Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).\n# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n#  * Redistributions of source code must retain the above copyright\n#    notice, this list of conditions and the following disclaimer.\n#\n#  * Redistributions in binary form must reproduce the above\n#    copyright notice, this list of conditions and the following\n#    disclaimer in the documentation and/or other materials provided\n#    with the distribution.\n#\n#  * Neither the name of the Nokia Corporation and/or its\n#    subsidiary(-ies) nor the names of its contributors may be used\n#    to endorse or promote products derived from this software\n#    without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nfrom django import template\nfrom django.template.loader import render_to_string\nfrom django.db import models\n\nfrom ietf.group.models import Group\n\nregister = template.Library()\n\nparent_short_names = {\n    \"ops\": \"Ops & Management\",\n    \"rai\": \"RAI\",\n    \"iab\": \"IAB\",\n    \"art\": \"Apps & Realtime\",\n    \"ietfadminllc\": \"IETF LLC\",\n}\n\nparents = Group.objects.filter(\n    models.Q(type=\"area\")\n    | models.Q(type=\"irtf\", acronym=\"irtf\")\n    | models.Q(acronym=\"iab\")\n    | models.Q(acronym=\"ietfadminllc\")\n    | models.Q(acronym=\"rfceditor\"),\n    state=\"active\",\n).order_by(\"type__order\", \"type_id\", \"acronym\")\n\n\n@register.simple_tag\ndef wg_menu(flavor):\n    global parents\n\n    for p in parents:\n        p.short_name = parent_short_names.get(p.acronym) or p.name\n        if p.short_name.endswith(\" Area\"):\n            p.short_name = p.short_name[: -len(\" Area\")]\n\n        if p.type_id == \"area\":\n            p.menu_url = \"/wg/#\" + p.acronym\n        elif p.acronym == \"irtf\":\n            p.menu_url = \"/rg/\"\n        elif p.acronym == \"iab\":\n            p.menu_url = \"/program/\"\n        elif p.acronym == \"ietfadminllc\":\n            p.menu_url = \"/adm/\"\n        elif p.acronym == \"rfceditor\":\n            p.menu_url = \"/rfcedtyp/\"\n\n    return render_to_string(\n        \"base/menu_wg.html\", {\"parents\": parents, \"flavor\": flavor}\n    )\n", "path": "ietf/doc/templatetags/wg_menu.py"}], "after_files": [{"content": "# Copyright The IETF Trust 2009-2023, All Rights Reserved\n\n# Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).\n# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n#  * Redistributions of source code must retain the above copyright\n#    notice, this list of conditions and the following disclaimer.\n#\n#  * Redistributions in binary form must reproduce the above\n#    copyright notice, this list of conditions and the following\n#    disclaimer in the documentation and/or other materials provided\n#    with the distribution.\n#\n#  * Neither the name of the Nokia Corporation and/or its\n#    subsidiary(-ies) nor the names of its contributors may be used\n#    to endorse or promote products derived from this software\n#    without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nimport debug    # pyflakes: ignore\n\nfrom django import template\nfrom django.template.loader import render_to_string\nfrom django.db import models\n\nfrom ietf.group.models import Group\n\nregister = template.Library()\n\nparent_short_names = {\n    \"ops\": \"Ops & Management\",\n    \"rai\": \"RAI\",\n    \"iab\": \"IAB\",\n    \"art\": \"Apps & Realtime\",\n    \"ietfadminllc\": \"IETF LLC\",\n}\n\nparents = Group.objects.filter(\n    models.Q(type=\"area\")\n    | models.Q(type=\"irtf\", acronym=\"irtf\")\n    | models.Q(acronym=\"iab\")\n    | models.Q(acronym=\"ietfadminllc\")\n    | models.Q(acronym=\"rfceditor\"),\n    state=\"active\",\n).order_by(\"type__order\", \"type_id\", \"acronym\")\n\n\n@register.simple_tag\ndef wg_menu(flavor):\n    global parents\n\n    for p in parents:\n        p.short_name = parent_short_names.get(p.acronym) or p.name\n        if p.short_name.endswith(\" Area\"):\n            p.short_name = p.short_name[: -len(\" Area\")]\n\n        if p.type_id == \"area\":\n            p.menu_url = \"/wg/#\" + p.acronym.upper()\n        elif p.acronym == \"irtf\":\n            p.menu_url = \"/rg/\"\n        elif p.acronym == \"iab\":\n            p.menu_url = \"/program/\"\n        elif p.acronym == \"ietfadminllc\":\n            p.menu_url = \"/adm/\"\n        elif p.acronym == \"rfceditor\":\n            p.menu_url = \"/rfcedtyp/\"\n\n    return render_to_string(\n        \"base/menu_wg.html\", {\"parents\": parents, \"flavor\": flavor}\n    )\n", "path": "ietf/doc/templatetags/wg_menu.py"}]}