reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Markdown Code Blocks

Open Meathelix1 opened this issue 2 years ago β€’ 3 comments

Describe the bug Markdown Code Blocks not working with code.

To Reproduce Steps to reproduce the behavior:

` pc.markdown( ``` python

            class MainState(pc.State):
            
            ```
            ),

`

Error:

``` python
^

SyntaxError: invalid syntax

Expected behavior Show in Markdown Code Block

** Specifics (please complete the following information):**

  • Python Version: 3.10.9
  • Pynecone Version: pynecone 0.1.19
  • OS: Windows 10

Meathelix1 avatar Mar 08 '23 04:03 Meathelix1

πŸ‘€

d29107d avatar Mar 08 '23 23:03 d29107d

@Meathelix1 I didn't get you. Could you format your description? You should pass str(""") to pc.markdown instead of ```. image

d29107d avatar Mar 09 '23 17:03 d29107d

It works like below:

        pc.markdown(
        """
        ``` python
        class MainState(pc.State):
            pass
        ```
        """
        ),

d29107d avatar Mar 09 '23 17:03 d29107d