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

Soft wrap on pre tags #1185

Closed
wants to merge 1 commit into from
Closed

Soft wrap on pre tags #1185

wants to merge 1 commit into from

Conversation

dcramer
Copy link
Member

@dcramer dcramer commented Aug 29, 2019

No description provided.

@dcramer
Copy link
Member Author

dcramer commented Aug 29, 2019

Might be controversial, but imo the user experience of wrapping things like this mega long script tag is better:

https://docs.sentry.io/platforms/javascript/

@dcramer
Copy link
Member Author

dcramer commented Aug 29, 2019

image

@MimiDumpling
Copy link
Contributor

I'm okay with this, but I'd like @cameronmcefee's opinion on this, too.

@evanpurkhiser
Copy link
Member

This might be weird for other things. Have you looked at the java example? IMO what’s better is to hard break the actual example code

@dcramer
Copy link
Member Author

dcramer commented Aug 29, 2019

@dcramer dcramer closed this Aug 29, 2019
@evanpurkhiser evanpurkhiser deleted the feat/soft-wrap-pre branch August 29, 2019 18:02
@cameronmcefee
Copy link
Contributor

cameronmcefee commented Aug 29, 2019

Pre wrap styles always fix one problem and create ten more. You kinda just have to decide which bad solution you prefer.

If you want a higher-maintenance solution, there is a zero-width space unicode character that can be used to imply logical breakpoints in long strings. However, this requires manual usage, is invisible, and will be copy/pastable which can break code in infuriatingly opaque ways. There's also the wbr html tag that serves the same purpose, though use of that within pre can be tricky.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants