Skip to content

Commit

Permalink
Fix code block rendering in demo app (#250)
Browse files Browse the repository at this point in the history
To fix the issue we use four backticks for code fence to avoid conflicts
with backticks being used within the displayed code.
  • Loading branch information
richard-to authored May 15, 2024
1 parent d97cd21 commit d0b3e28
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions demo/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,12 @@ def demo_code(code_arg: str):
)
):
box_header("Code")
# Use four backticks for code fence to avoid conflicts with backticks being used
# within the displayed code.
me.markdown(
f"""```
f"""````
{code_arg}
```
````
""",
style=me.Style(
border=me.Border(
Expand Down

0 comments on commit d0b3e28

Please sign in to comment.