-
Notifications
You must be signed in to change notification settings - Fork 429
Tidy should word wrap its message output #519
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
Comments
@balthisar thank you for this As stated that In a simple reading of this But, sorry, there are some issues... that I see... maybe I am real wrong! And only look for clarification... Like So why should If you have an app that uses So I ask, what are we Yes, a new option, So, sorry, still on the negative side here, but can be convinced... I think, for sure, Tidy messages should wrap at about 80 chars... any user app that uses libtidy can deal with that... Should we re-set our message output, globally, removing these But it seems just a voice in the wilderness here... |
Actually, that's an excellent point! There are several more so called "configuration options" that I'd like to gut from LibTidy completely. From the pure library standpoint, Tidy should be delivering strings, unbroken, without any assumptions about formatting. The console application -- as a LibTidy client -- should be responsible for all output, including wrapping the text, but other things such as displaying messages and errors. The Library shouldn't be doing any of this. Simple task to move the word-wrapping from LibTidy into the console, leave the strings in LibTidy without stupid newlines, and purify the library a little bit. Other things that should be removed are things like show-info, show-errors, etc., that are very definitely client-related and not library related, but they're on my longer-term to-do list. The new message callback API will make this a LOT easier by not counting on an output sink that thinks it know better about the environment than the user. In any case, moving the functionality to client is something I'm willing to do, but we absolutely cannot have hard breaks in the language strings. That's just stupid: it's bad data management; they're not needed; and it's committing the cardinal sin of mixing presentation and content, something that Tidy itself tries to prevent by, for example, creating CSS classes where necessary. But, yeah, this change would definitely permit removing the console-width option. This is a good change. Thanks for setting me straight. |
@balthisar wow, how many more ways can you say these stupid newlines ;=)) But how this can be classified as a cardinal sin, which I thought were If we really wanted a console And even if a 3rd party app uses the new message callback API, which I hope you are not suggesting we use in OT: Then you jump all over config option that you suggest are And then I started to wonder again what are all these other changes in There is no doubt we could improve and increase the At this moment I still feel most of #518 is not needed, but can be swayed... thanks... And a small point. If you do suggest a change in the If the change is agreed, then these additional, very necessary steps can come later... This would certainly reduce the |
Do you have a valid argument against removing new lines? You're seem to be rejecting change without a valid reason why it's a bad thing. |
I agree with Balthisar to remove all presentation oriented stuff from the library. Edit on next day: |
Tidy should word wrap its message output when used in a console of arbitrary sizes. Currently all Tidy output is limited to 80 characters regardless of console dimensions.
Proposal
file
option is used, or any output is piped to a file, or Tidy is run in a non-interactive shell, it should default to 80 characters.Optional
console-width
) to allow users to specify their own preference.Alternative proposal
Summary:
console-width
to keep things statically frozen in time for console usefile
option, or pipes/redirection, or run in a login-only shell.The text was updated successfully, but these errors were encountered: