githubnext / blocks

A set of files to use as input for Blocks.
https://blocks.githubnext.com
MIT License
337 stars 43 forks source link

<BlockComponent> in Markdown is rendered, should stay code #50

Open duerrsimon opened 1 year ago

duerrsimon commented 1 year ago

Wanted to showcase the custom block I created and how to embed it in the README of the repo. With the below Markdown I would expect the BlockComponent to be rendered once, and once the code being displayed. Instead the BlockComponent inside the Markdown code block is also interpreted. See: https://blocks.githubnext.com/duerrsimon/gradio-block/blob/main/README.md?blockKey=githubnext__blocks-examples__markdown-block&fileRef=

<BlockComponent block={{"owner":"duerrsimon","repo":"gradio-block","id":"hfspaces-block","type":"file"}} context={{"repo":"gradio-block","owner":"duerrsimon","path":"example/hf.yml","sha":"main","file":"README.md"}} />

Demo

<BlockComponent block={{"owner":"duerrsimon","repo":"gradio-block","id":"hfspaces-block","type":"file"}} context={{"repo":"gradio-block","owner":"duerrsimon","path":"example/hf.yml","sha":"main","file":"README.md"}} />