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
Only wrap at tags #854
Comments
@DustVoice at first glance, this looks like, potentially new Pretty Print option... Maybe the title suggests a Like maybe Or maybe it suggests, do not wrap, according to the current encountered-a-spacey-char rule(s)... only on the next tag... that is, sort of, keep all text, and/? attributes, in the same line, until an open tag encountered... assume allow close tags, on the same line... or ??? Getting lost in thought, possibilities, ... For example, explain, show, how would you wrap-at-tags the html code Although you have given several snippets... thanks... it would be good if you constructed a simple example... show the options you use... the output of current tidy, with its version... and then what you expect to see... may help, give ideas, speed up development... Do not include the So while this started out like a simple additional option, as I explore it, it seems much more explanation, samples, must be given... even to know where to start, and what is expected... or am I missing something, obvious... thanks... |
No problem I will supply you with the requested samples within the next few days. |
@DustVoice as it has been nearly a year, and no clear specification has emerged, so can only close this... sorry... To say something like Current And please understand, changing output specification, so called What one group of people like, others will complain... one wants a newline here, or there, while others will say there should not be any newline there, or here... the best tidy can do is some sort of messy compromise... never satisfying everybody at the same time... That said, if you can come up with a clear spec, with samples, feel free to re-open, or file a new issue... thanks... |
Yes sorry. Because we really needed the issue resolved rather quickly, as per request of our team leader, we had to drop tidy unfortunately. If I use tidy again and experience the same issue again, I will most certainly be able to provide you with a clear spec and reopen the issue. Until then I thank you for your time and effort. |
In our project, we would like to have each tag in a new line.
Currently we have the problem that
tidy
either puts attributes etc. on a new line:=>
tidy --indent auto --indent-spaces 4 --drop-proprietary-attributes no --drop-empty-elements no --tidy-mark no formular.html > formular2.html
=>or if I supply
tidy
with the--wrap 0
option,tidy
masheslabel
,input
andspan
onto one line:=>
tidy --indent auto --indent-spaces 4 --drop-proprietary-attributes no --drop-empty-elements no --tidy-mark no --wrap 0 formular.html > formular2.html
=>We would love more of a result, like the
-xml
option produces:=>
tidy -xml --indent auto --indent-spaces 4 --drop-proprietary-attributes no --drop-empty-elements no --tidy-mark no --wrap 0 formular.html > formular2.html
=>but without the caveats that the
-xml
option has, like html validation,head
andbody
tags indented, etc.It would be nice, if one could tell
tidy
to--wrap 0
but place every tag on a new line or something.This currently the only thing holding us back from using
tidy
the intended way in our production environment and we would be happy if there could be an option to achieve our wanted result.Thanks in advance
The text was updated successfully, but these errors were encountered: