Skip to content

Commit

Permalink
Escape triple quotes when creating space.py for custom components (#…
Browse files Browse the repository at this point in the history
…7290)

* escape triple quotes when creating space.py for custom components

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
  • Loading branch information
abidlabs and gradio-pr-bot committed Feb 5, 2024
1 parent e5344ba commit db27df3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/light-lemons-shout.md
@@ -0,0 +1,5 @@
---
"gradio": patch
---

fix:Escape triple quotes when creating `space.py` for custom components
1 change: 1 addition & 0 deletions gradio/cli/commands/components/_docs_utils.py
Expand Up @@ -837,6 +837,7 @@ def make_space(
To ignore this error pass `--suppress-demo-check` to the docs command."""
)
demo = demo.replace('"""', '\\"\\"\\"')

source = """
import gradio as gr
Expand Down

0 comments on commit db27df3

Please sign in to comment.