Escape triple quotes when creating space.py for custom components (#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>
This commit is contained in:
Abubakar Abid 2024-02-05 10:06:34 -08:00 committed by GitHub
parent e5344ba0cd
commit db27df36d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
"gradio": patch
---
fix:Escape triple quotes when creating `space.py` for custom components

View File

@ -837,6 +837,7 @@ if __name__ == '__main__':
To ignore this error pass `--suppress-demo-check` to the docs command.""" To ignore this error pass `--suppress-demo-check` to the docs command."""
) )
demo = demo.replace('"""', '\\"\\"\\"')
source = """ source = """
import gradio as gr import gradio as gr