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

Allow customization of wrapping controls. #25

Open
kentfredric opened this issue Oct 11, 2014 · 2 comments
Open

Allow customization of wrapping controls. #25

kentfredric opened this issue Oct 11, 2014 · 2 comments

Comments

@kentfredric
Copy link
Contributor

Until now I've abused the fact wrapping is implemented in terms of Text::Wrap, and coerced Text::Wrap to have some less insane defaults.

Some of those are outlined here: https://rt.cpan.org/Ticket/Display.html?id=95736

$Text::Wrap::break='[\x09\x20]';
$Text::Wrap::huge='overflow';

And both of those are important because the first prevents unicode NONBREAK-SPACE (0xA0) from being wrapped on, and the second prevents long tokens ( like URI's ) from being uselessly snapped in two.

The last one I do personally is localise

$Text::Wrap::columns = 120

Because under 80 columns I find far too restrictive for any serious amount of text.

And this ability has been clobbered by 087f3b7 , where it localises it at a scope closer than I can access.

@haarg
Copy link
Member

haarg commented May 19, 2015

For now, I've backed out the change to force wrapping at 78 characters. I'm intending to replace the entire internal implementation though, and currently it doesn't use Text::Wrap at all. So we still should figure out a better way to handle this.

@haarg
Copy link
Member

haarg commented May 23, 2015

For reference, @kentfredric's preferred break and huge settings are now being set internally because they are much more sensible.

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

No branches or pull requests

2 participants