Skip to content

fix new line not working#318998

Merged
justschen merged 2 commits into
mainfrom
justin/dewpider
May 29, 2026
Merged

fix new line not working#318998
justschen merged 2 commits into
mainfrom
justin/dewpider

Conversation

@justschen
Copy link
Copy Markdown
Collaborator

fix #318845

Copilot AI review requested due to automatic review settings May 29, 2026 16:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a regression where multi-paragraph plain text in chat responses was being merged into a single paragraph. The fast-path renderPlainTextMarkdown was wrapping any value without specific markdown syntax in a single <p>, which collapsed \n\n paragraph breaks via CSS whitespace normalization. Now any value containing a newline bypasses the fast path and goes through the full markdown renderer, which correctly produces separate <p> elements for paragraph breaks.

Changes:

  • Reject strings containing \n from the plain-text fast path so paragraph and line breaks are handled by the full markdown renderer.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.ts Adds value.includes('\n') to the fast-path rejection condition.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@justschen justschen marked this pull request as ready for review May 29, 2026 16:45
@justschen justschen merged commit ff153b4 into main May 29, 2026
25 checks passed
@justschen justschen deleted the justin/dewpider branch May 29, 2026 17:52
@vs-code-engineering vs-code-engineering Bot added this to the 1.123.0 milestone May 29, 2026
@garretwilson
Copy link
Copy Markdown

No unit tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub Copilot in v1.122 combines Markdown paragraphs in chat display

4 participants