We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4a52f4 commit 1219082Copy full SHA for 1219082
shiny/ui/_markdown_stream.py
@@ -141,11 +141,14 @@ async def _task():
141
result = ""
142
async with self._streaming_dot():
143
async for x in content:
144
- # x _can_ be a TagChild, but it's most likely just a string (of
145
- # markdown), so optimize for that case
146
if isinstance(x, str):
+ # x is most likely a string, so avoid overhead in that case
147
ui: RenderedDeps = {"html": x, "deps": []}
148
else:
+ # process_ui() does *not* render markdown->HTML, but it does:
149
+ # 1. Extract and register HTMLdependency()s with the session.
150
+ # 2. Returns a HTML string representation of the TagChild
151
+ # (i.e., `div()` -> `"<div>"`).
152
ui = self._session._process_ui(x)
153
154
result += ui["html"]
0 commit comments