New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new lines in gr.Markdown
#5356
Comments
This was intentional in order to make it consistent with our other uses of markdown in gradio. This consistent with how markdown behaves in GitHub comments but not in rendered files. If we change this settings we'll need to change it for everything. |
Thanks. I see. Yeah, GitHub renders lines in comments in separate lines, but GitHub renders consecutive lines in I feel like there are pros and cons to both, so maybe it would be nice to have an optional argument in |
I think its better not too add too many parameters to |
By a very easy workaround, do you mean adding I got interested in what other libraries were doing. Looks like Python's markdown library has an extension to render new line as |
Oh sorry I misunderstood. I thought the change went the other way around -- we no longer respected single line breaks, so my suggestion would have been to just add a line break. This is a bit more annoying to deal with and I agree not the typical way I've seen Markdown rendered. I think its reasonable to add a flag to control this behavior, particularly for Thanks for clarifying @hysts |
Describe the bug
Not sure if this is a bug or just a breaking change, but the way
gr.Markdown
handles line breaks seems to have been changed ingradio==3.41.x
.Consecutive lines in markdown are often rendered as one long line unless there is blank line in it. GitHub renders markdown that way, and also it was the way
gr.Markdown
rendered markdown withgradio==3.40.1
.But now with
gradio==3.41.2
, consecutive lines are rendered as separate lines. Is this an intentional change or a bug?Have you searched existing issues? 🔎
Reproduction
https://huggingface.co/spaces/hysts-debug/markdown-new-line-gradio-3-40-1
https://huggingface.co/spaces/hysts-debug/markdown-new-line
Screenshot
gradio==3.40.1
gradio==3.41.2
Logs
No response
System Info
Severity
I can work around it
The text was updated successfully, but these errors were encountered: