Render code blocks as ~rectangular, not just where code exists #1347
Labels
area: message rendering
enhancement
New feature or request
further discussion required
Discuss this on #zulip-terminal on chat.zulip.org
Currently the text of a code block is only highlighted until the end of a line, and empty lines also look like they 'split' a code block, since there is no background color on that line at all.
This was considered in a few ways in the last 3 commits of #1012: (not the last)
This was previously discussed in #zulip-terminal > Syntax-highlighting using pygments #T1012, though I'm not sure there was a follow-up topic to specifically handle these remaining points.
The challenge with both of the approaches above, is that long-line code can wrap on one or many lines, which can make the code block look quite messy.
The user can already view the raw/rendered full message via the message information popup, and if we enable the user to copy a code block from there too, we could trim the end of long lines.
However, this depends on specifying a length to trim the line:
The latter point is challenging since all message content is currently treated as styled input to a single urwid.Text widget.
The text was updated successfully, but these errors were encountered: