Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code blocks are wrapped #492

Open
matthiasbeyer opened this issue Jul 6, 2021 · 2 comments
Open

Code blocks are wrapped #492

matthiasbeyer opened this issue Jul 6, 2021 · 2 comments
Labels

Comments

@matthiasbeyer
Copy link

Describe the bug

Codeblocks introduced with the three backticks are wrapped, causing them to be unusable for ascii-art.
Example: https://beyermatthias.de/butido-a-linux-package-building-tool-in-rust

(make sure to narrow down your browser window)

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Have a ``` codeblock
  2. Make the screen small
  3. See the wrapped code

Expected behavior

Codeblocks should, if the screen is too narrow, be scrollable.

Application configuration

  • Single mode
  • sqlite
  • Open registration? no
  • Federation enabled? yes

Version or last commit:
0.12

@matthiasbeyer
Copy link
Author

Can someone please confirm this bug?

@thebaer
Copy link
Member

thebaer commented Aug 3, 2021

Sorry for the delay on this, @matthiasbeyer -- thanks for the report. I confirmed the same thing is happening for me. I think it's just a question of what's the best solution here.

In general, we're very hesitant to change default layout behavior unless there's a clear desire from most people to see it changed. So I think we'll need to hear from other users on this. Should code blocks automatically wrap, as they do today? Or should they be scrollable?

Otherwise, for now, there's a quick workaround for this with custom CSS you can add to your blog:

pre {
    overflow-x: auto;
}
pre code {
    white-space: pre !important;
}

@thebaer thebaer added the design label Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants