prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Markdown support for radio buttons
  ### Problem
  
  Colored text and other markdown elements work in the label of `st.radio` but not in the texts of the radio elements. This is a bit weird since we do support it in the texts of checkboxes (where the text next to the checkbox is the label). 
  
  
  ### Solution
  
  Allow markdown in the options of `st.radio`. 
  
  
  ---
  
  Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.
  
  **If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.**
  
  
  </issue>
  <code>
  [start of e2e/scripts/st_radio.py]
  1 # Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #     http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 import pandas as pd
  16 
  17 import streamlit as st
  18 from streamlit import runtime
  19 from tests.streamlit import pyspark_mocks
  20 
  21 options = ("female", "male")
  22 i1 = st.radio("radio 1", options, 1)
  23 st.write("value 1:", i1)
  24 
  25 i2 = st.radio("radio 2", options, 0, format_func=lambda x: x.capitalize())
  26 st.write("value 2:", i2)
  27 
  28 i3 = st.radio("radio 3", [])
  29 st.write("value 3:", i3)
  30 
  31 i4 = st.radio("radio 4", options, disabled=True)
  32 st.write("value 4:", i4)
  33 
  34 i5 = st.radio("radio 5", options, horizontal=True)
  35 st.write("value 5:", i5)
  36 
  37 i6 = st.radio("radio 6", pd.DataFrame({"foo": list(options)}))
  38 st.write("value 6:", i6)
  39 
  40 i7 = st.radio("radio 7", options, label_visibility="hidden")
  41 st.write("value 7:", i7)
  42 
  43 i8 = st.radio("radio 8", options, label_visibility="collapsed")
  44 st.write("value 8:", i8)
  45 
  46 
  47 if runtime.exists():
  48 
  49     def on_change():
  50         st.session_state.radio_changed = True
  51 
  52     st.radio("radio 9", options, 1, key="radio9", on_change=on_change)
  53     st.write("value 9:", st.session_state.radio9)
  54     st.write("radio changed:", "radio_changed" in st.session_state)
  55 
  56 st.radio("PySpark radio", pyspark_mocks.DataFrame())  # type: ignore
  57
  [end of e2e/scripts/st_radio.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/e2e/scripts/st_radio.py b/e2e/scripts/st_radio.py
  --- a/e2e/scripts/st_radio.py
  +++ b/e2e/scripts/st_radio.py
  @@ -19,6 +19,16 @@
   from tests.streamlit import pyspark_mocks
   
   options = ("female", "male")
  +markdown_options = (
  +    "**bold text**",
  +    "*italics text*",
  +    "~strikethrough text~",
  +    "shortcode: :blush:",
  +    # link should not work in radio options
  +    "[link text](www.example.com)",
  +    "`code text`",
  +    ":red[red] :blue[blue] :green[green] :violet[violet] :orange[orange]",
  +)
   i1 = st.radio("radio 1", options, 1)
   st.write("value 1:", i1)
   
  @@ -43,14 +53,16 @@
   i8 = st.radio("radio 8", options, label_visibility="collapsed")
   st.write("value 8:", i8)
   
  +i9 = st.radio("radio 9", markdown_options)
  +st.write("value 9:", i9)
   
   if runtime.exists():
   
       def on_change():
           st.session_state.radio_changed = True
   
  -    st.radio("radio 9", options, 1, key="radio9", on_change=on_change)
  -    st.write("value 9:", st.session_state.radio9)
  +    st.radio("radio 10", options, 1, key="radio10", on_change=on_change)
  +    st.write("value 10:", st.session_state.radio10)
       st.write("radio changed:", "radio_changed" in st.session_state)
   
   st.radio("PySpark radio", pyspark_mocks.DataFrame())  # type: ignore
  
verification_info: {"golden_diff": "diff --git a/e2e/scripts/st_radio.py b/e2e/scripts/st_radio.py\n--- a/e2e/scripts/st_radio.py\n+++ b/e2e/scripts/st_radio.py\n@@ -19,6 +19,16 @@\n from tests.streamlit import pyspark_mocks\n \n options = (\"female\", \"male\")\n+markdown_options = (\n+    \"**bold text**\",\n+    \"*italics text*\",\n+    \"~strikethrough text~\",\n+    \"shortcode: :blush:\",\n+    # link should not work in radio options\n+    \"[link text](www.example.com)\",\n+    \"`code text`\",\n+    \":red[red] :blue[blue] :green[green] :violet[violet] :orange[orange]\",\n+)\n i1 = st.radio(\"radio 1\", options, 1)\n st.write(\"value 1:\", i1)\n \n@@ -43,14 +53,16 @@\n i8 = st.radio(\"radio 8\", options, label_visibility=\"collapsed\")\n st.write(\"value 8:\", i8)\n \n+i9 = st.radio(\"radio 9\", markdown_options)\n+st.write(\"value 9:\", i9)\n \n if runtime.exists():\n \n     def on_change():\n         st.session_state.radio_changed = True\n \n-    st.radio(\"radio 9\", options, 1, key=\"radio9\", on_change=on_change)\n-    st.write(\"value 9:\", st.session_state.radio9)\n+    st.radio(\"radio 10\", options, 1, key=\"radio10\", on_change=on_change)\n+    st.write(\"value 10:\", st.session_state.radio10)\n     st.write(\"radio changed:\", \"radio_changed\" in st.session_state)\n \n st.radio(\"PySpark radio\", pyspark_mocks.DataFrame())  # type: ignore\n", "issue": "Markdown support for radio buttons\n### Problem\r\n\r\nColored text and other markdown elements work in the label of `st.radio` but not in the texts of the radio elements. This is a bit weird since we do support it in the texts of checkboxes (where the text next to the checkbox is the label). \r\n\r\n\r\n### Solution\r\n\r\nAllow markdown in the options of `st.radio`. \r\n\r\n\r\n---\r\n\r\nCommunity voting on feature requests enables the Streamlit team to understand which features are most important to our users.\r\n\r\n**If you'd like the Streamlit team to prioritize this feature request, please use the \ud83d\udc4d (thumbs up emoji) reaction in response to the initial post.**\r\n\n", "before_files": [{"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport pandas as pd\n\nimport streamlit as st\nfrom streamlit import runtime\nfrom tests.streamlit import pyspark_mocks\n\noptions = (\"female\", \"male\")\ni1 = st.radio(\"radio 1\", options, 1)\nst.write(\"value 1:\", i1)\n\ni2 = st.radio(\"radio 2\", options, 0, format_func=lambda x: x.capitalize())\nst.write(\"value 2:\", i2)\n\ni3 = st.radio(\"radio 3\", [])\nst.write(\"value 3:\", i3)\n\ni4 = st.radio(\"radio 4\", options, disabled=True)\nst.write(\"value 4:\", i4)\n\ni5 = st.radio(\"radio 5\", options, horizontal=True)\nst.write(\"value 5:\", i5)\n\ni6 = st.radio(\"radio 6\", pd.DataFrame({\"foo\": list(options)}))\nst.write(\"value 6:\", i6)\n\ni7 = st.radio(\"radio 7\", options, label_visibility=\"hidden\")\nst.write(\"value 7:\", i7)\n\ni8 = st.radio(\"radio 8\", options, label_visibility=\"collapsed\")\nst.write(\"value 8:\", i8)\n\n\nif runtime.exists():\n\n    def on_change():\n        st.session_state.radio_changed = True\n\n    st.radio(\"radio 9\", options, 1, key=\"radio9\", on_change=on_change)\n    st.write(\"value 9:\", st.session_state.radio9)\n    st.write(\"radio changed:\", \"radio_changed\" in st.session_state)\n\nst.radio(\"PySpark radio\", pyspark_mocks.DataFrame())  # type: ignore\n", "path": "e2e/scripts/st_radio.py"}]}