Allow overflow wrap in pre
blocks
#5384
Closed
Zelzahn
started this conversation in
Feature requests
Replies: 1 comment 1 reply
-
There is no right or wrong answer here. We chose to mimic the behaviour of GitHub which doesn't wrap lines in codeblocks. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Current behaviour:
![image](https://private-user-images.githubusercontent.com/2775701/307262235-c625694c-2d3f-4f29-97b7-f389bdc02d67.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTQxNzEsIm5iZiI6MTcyNTU5Mzg3MSwicGF0aCI6Ii8yNzc1NzAxLzMwNzI2MjIzNS1jNjI1Njk0Yy0yZDNmLTRmMjktOTdiNy1mMzg5YmRjMDJkNjcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDZUMDMzNzUxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTJiYWRlYjhjYWU4MDBiNjg4N2RlZjYxYTU2YjVhYjM4MmI4ODczNmRkNDM3MDFkY2NmN2EzNWEwOGJjZTc3ZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.jmDsLH47yZ8Dtmx8pDLa0l0nggsr8KtEdDnnIEl2nIo)
What I would like:
![image](https://private-user-images.githubusercontent.com/2775701/307262177-8be8bb66-2ca7-4404-913f-9dc914328054.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTQxNzEsIm5iZiI6MTcyNTU5Mzg3MSwicGF0aCI6Ii8yNzc1NzAxLzMwNzI2MjE3Ny04YmU4YmI2Ni0yY2E3LTQ0MDQtOTEzZi05ZGM5MTQzMjgwNTQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDZUMDMzNzUxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NjdlMDVlM2E5YzEwMjJmYzE1NzA2ODI0ZTM1M2RlNDA5Nzk5YjVjZjA0MzNkZjNjYTZjYzczMmUxOTRiNTY5MCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.mtvzc1RYdXz0ATJiHOK-x3-zR9m-Mnr3aazeGdis84w)
To have this, the following CSS rule would need to be added to the
pre
tag:white-space: pre-wrap;
. I do not know if there are any uses ofpre
without an accompanyingcode
, so I'm not sure if this CSS rule would be best limited topre
tags with acode
inside or not.The only situation where I could see that you wouldn't want this wrap would be when the
code
contains a very long one-liner. But that would also be difficult to read and better split up into multiple lines, e.g. by using\
in Python.Beta Was this translation helpful? Give feedback.
All reactions