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

Remove wordwrap for links so they don't break (on mobile and smaller #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

unkrich
Copy link
Contributor

@unkrich unkrich commented Sep 22, 2022

screen sizes)

The current implementation of wordwrap is only used in the case of a link. At which point it checks against a maxWidth of 76 and breaks the link, and/or inserts a newline character if whitespace is found.

Introducing a newline character breaks the link and is seemingly unnecessary (may have to do with addonFit).

Introducing a newline on whitespace character is also seemingly unecessary as a URL should not have a whitespace character anywhere but possibly the end of the string.

Possible fix for #38 and #42 (the latter issue is less clear).

One possible oversight is that wordwrap may be useful for the case where a string with multiple URLs passed in separated by a whitespace character that should actually be a newline is missed. This doesn't appear to be a problem.

screen sizes)

The current implementation of wordwrap is only used in the case of a
link. At which point it checks against a maxWidth of 76 and breaks the
link, and/or inserts a newline character if whitespace is found.

Introducing a newline character breaks the link and is seemingly unnecessary
(may have to do with addonFit).

Introducing a newline on whitespace character is also seemingly
unecessary as a URL should not have a whitespace character anywhere but
possibly the end of the string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant