Multi-line code blocks apply monospace font to entire message
See original GitHub issueWhen using multi-line code blocks in a message, the entire message appears to be rendered as preformatted text. RiotX v0.12.0. See below for example.
Message source containing multi-line code block.
The <pre>
tag is correctly placed in formatted_body
, but the message renders incorrectly.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:17
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Multi-line code blocks apply monospace font to entire message
When using multi-line code blocks in a message, the entire message appears to be rendered as preformatted text. RiotX v0.12.0.
Read more >Use Markdown formatting in Teams - Microsoft Support
Use Markdown to share code You can format and share your code on Teams. To add an inline block of code, start and...
Read more >A complete guide to formatting text on Discord - Remote Tools
A complete guide on Discord text formatting, right from how to bold, Italicize, strikethrough and underline on Discord to advanced coloring options.
Read more >Format messages - Mattermost Documentation
Creating a fixed-width code block is recommended for pasting multi-line blocks of code or other text output because it's easier to read with...
Read more >Markdown Text 101 (Chat Formatting: Bold, Italic, Underline)
2) You can also use three backticks (```) to create multiline code blocks, like this beautifully written haiku. 2_multiple_line_code_blocks.png ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, those are limitations we are aware of, thanks for having created the issue.
To be honest, we are thinking on removing the scrollability on code blocks and rather replace it with a real code previewer, which will be opened when you click on a code block, and which will display line numbers on the left, will be scrollable in each direction and eventually have syntax coloration. Some libraries may doing this quite well.
This could also be used for (decrypted) event source preview, rather than the simple dialog we have so far.
@bmarty This is totally a subjective thing, but I personally would prefer code block scrollability over a dedicated code view, since a lot of people I know (myself included) mix code blocks with prose when collaborating with others. A dedicated code view would take you away from the prose as you look at the code, at least from my current understanding of how that’d be implemented.