Skip to content

Commit

Permalink
Chatbot streaming hotfix (#4537)
Browse files Browse the repository at this point in the history
* changes

* changes

* changes

* changes
  • Loading branch information
aliabid94 committed Jun 15, 2023
1 parent b3b8ff9 commit 42d762c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ No changes to highlight.

## Bug Fixes:

No changes to highlight.
- Fix chatbot streaming by [@aliabid94](https://github.com/aliabid94) in [PR 4537](https://github.com/gradio-app/gradio/pull/4537)

## Other Changes:

Expand Down
2 changes: 1 addition & 1 deletion gradio/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.35.0
3.35.1
4 changes: 2 additions & 2 deletions js/chatbot/src/MarkdownCode.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { onMount, tick } from "svelte";
import { afterUpdate, tick } from "svelte";
import DOMPurify from "dompurify";
import render_math_in_element from "katex/dist/contrib/auto-render.js";
import { marked } from "./utils";
Expand All @@ -14,7 +14,7 @@
let el: HTMLSpanElement;
let mounted = false;
onMount(() => {
afterUpdate(() => {
tick().then(() => {
requestAnimationFrame(() => {
el.innerHTML = DOMPurify.sanitize(marked.parse(message));
Expand Down

0 comments on commit 42d762c

Please sign in to comment.