mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-25 12:10:31 +08:00
Change markdown rendering to set breaks to false (#5368)
* change markdown rendering to set breaks to false * add changeset * update stories * lint --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
b89688984f
commit
b27f758325
6
.changeset/shy-fans-chew.md
Normal file
6
.changeset/shy-fans-chew.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@gradio/markdown": patch
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
fix:Change markdown rendering to set breaks to false
|
@ -18,17 +18,33 @@
|
||||
|
||||
<Template let:args>
|
||||
<Markdown
|
||||
value="Here's some <strong>bold</strong> text. And some <em>italics</em> and some <code>code</code>"
|
||||
value="Here's some **bold** text. And some *italics* and some `code`"
|
||||
latex_delimiters={[]}
|
||||
{...args}
|
||||
/>
|
||||
</Template>
|
||||
|
||||
<Story name="Simple inline Markdown with HTML" />
|
||||
|
||||
<Story name="Right aligned Markdown with HTML" args={{ rtl: true }} />
|
||||
<Story name="Simple inline Markdown" />
|
||||
|
||||
<Story
|
||||
name="Markdown with math"
|
||||
name="Multiline Markdown"
|
||||
args={{
|
||||
value: `
|
||||
This should
|
||||
all be in one line.
|
||||
|
||||
---
|
||||
|
||||
This should be
|
||||
|
||||
in two separate lines.`
|
||||
}}
|
||||
/>
|
||||
|
||||
<Story name="Right aligned Markdown" args={{ rtl: true }} />
|
||||
|
||||
<Story
|
||||
name="Markdown with LaTeX"
|
||||
args={{
|
||||
value: "What is the solution of $y=x^2$?",
|
||||
latex_delimiters: [{ left: "$", right: "$", display: false }]
|
||||
|
@ -107,7 +107,7 @@ const renderer: Partial<Omit<Renderer, "constructor" | "options">> = {
|
||||
marked.use(
|
||||
{
|
||||
gfm: true,
|
||||
breaks: true,
|
||||
breaks: false,
|
||||
pedantic: false,
|
||||
headerIds: false,
|
||||
mangle: false
|
||||
|
Loading…
x
Reference in New Issue
Block a user