Skip to content

Using a backtick in a long sentence goes out of the screen. #2655

Answered by mmistakes
wjrmffldrhrl asked this question in Q&A
Discussion options

You must be logged in to vote

That long string above has no spaces which is why it overflows outside of the browser's viewport.
This is the default behavior.

Fixes are:

  • Don't use long strings with no spaces that are wider than the smallest screen size you hope to support
  • Use multi-line code block instead with triple back tick.
  • Override <code> CSS to wrap by adding word-break: break-all ... this could have unintended issues elsewhere.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mmistakes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2655 on December 09, 2020 04:50.