Repository navigation
Conversation
The model writes <br> for a line break, for example in a poem. The inline parsers of the web app and the mobile app do not read HTML, so the chat showed the tag as text. Both parsers now change a <br> to a line break after the inline split, so an italic span over a <br> stays one span. On a phone, the banner of a shared chat put the text and the buttons in one row, and the text became a narrow column. The text group now has a minimum width, so the buttons wrap to their own row.
The BR constant sat between the doc comment and renderInline. Move the constant above the comment so the comment documents the function.
The <br> replacement gave a newline, but only the plain paragraph showed it. Table cells, list items and headings collapsed it to a space. Add whitespace-pre-line to those wrappers. A no-wrap table column uses whitespace-pre, which keeps the break and the no-wrap. The replacement also ran inside inline code spans. Skip a code part on web and on mobile, so `a<br>b` stays literal.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
<br>for a line break, for example in a poem or a table cell. The inline parsers do not read HTML, so the chat showed<br>as text.Change
renderInline(web) andparseInline(mobile) change each<br>to a line break after the inline split. An italic span over a<br>stays one span. A<br>inside a code span stays literal.whitespace-pre-line(a no-wrap column useswhitespace-pre), so the break shows there too, not only in paragraphs.min(100%, 20rem), so the buttons wrap to their own row on a phone.Test
parseInlinetests inmarkdown.test.ts, including the code-span case.answer-br.test.tsx: a<br>in a table cell breaks, and a<br>in a code span stays literal. Both fail on the code before the fix.Limits
<br>as text.