File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -181,25 +181,11 @@ def _(func: F) -> F:
181181 except ModuleNotFoundError :
182182 raise RuntimeError ("Please install shinylive to build the docs." )
183183
184- SHINYLIVE_CODE_TEMPLATE = """
185- ```{{shinylive-python}}
186- #| standalone: true
187- #| components: [editor, viewer]
188- #| layout: vertical
189- #| viewerHeight: 400
190-
191- {0}
192- ```
193- """
194-
195184 class ShinyliveExampleWriter (ExampleWriter ):
196185 def write_example (self , app_files : list [str ]) -> str :
197186 app_file = app_files .pop (0 )
198- bundle = shinylive ._url .create_shinylive_bundle_file (
199- app_file , app_files , language = "py"
200- )
201- code = shinylive ._url .create_shinylive_chunk_contents (bundle )
187+ app = shinylive .url_encode (app_file , app_files , language = "py" )
202188
203- return SHINYLIVE_CODE_TEMPLATE . format ( code . strip () )
189+ return app . chunk ( layout = "vertical" , viewerHeight = 400 )
204190
205191 example_writer = ShinyliveExampleWriter ()
You can’t perform that action at this time.
0 commit comments