question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi-line code blocks apply monospace font to entire message

See original GitHub issue

When 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.

2020-01-16-192429_322x179_scrot

Message source containing multi-line code block. 2020-01-16-192636_461x431_scrot

The <pre> tag is correctly placed in formatted_body, but the message renders incorrectly.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:17
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
bmartycommented, Jan 16, 2020

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.

1reaction
MyriaCorecommented, May 17, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found