Tidy command that only fixes indent
up vote
1
down vote
favorite
I have a number of HTML files that contain snippets of HTML code (not full pages, so no body tags, etc). Unfortunately the HTML in those files is completely unindented.
I'd like to run tidy to re-indent the file, but tidy tries to do a lot of other things that I don't want it to do. The only modification I want made to the file in indent.
Is there any way to turn off all the other tidy behavior and just have it indent, or another tool (I'm on linux) that I could use to achieve this?
html indent
add a comment |
up vote
1
down vote
favorite
I have a number of HTML files that contain snippets of HTML code (not full pages, so no body tags, etc). Unfortunately the HTML in those files is completely unindented.
I'd like to run tidy to re-indent the file, but tidy tries to do a lot of other things that I don't want it to do. The only modification I want made to the file in indent.
Is there any way to turn off all the other tidy behavior and just have it indent, or another tool (I'm on linux) that I could use to achieve this?
html indent
Have you tried adjusting Tidy's Options?
– Ƭᴇcʜιᴇ007
Feb 20 '14 at 18:23
Tidy has a TON of options, and I'm having trouble telling what I need to change. Thus my question. I'm looking for a way to turn everything off except indentation.
– Herms
Feb 20 '14 at 19:16
Or for another tool I can use that will accomplish this if tidy insists on doing too much.
– Herms
Feb 20 '14 at 19:17
So turn off all optined except indent. Tool requests are off-topic in general. Why not use one of MANY on-line HTML tidying sites? Like Tabifier?
– Ƭᴇcʜιᴇ007
Feb 20 '14 at 19:22
Because it's generally frowned upon at my company to use tools that require sending code externally (in this case it shouldn't be an issue but I'm trying to follow the rules).
– Herms
Feb 20 '14 at 19:37
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have a number of HTML files that contain snippets of HTML code (not full pages, so no body tags, etc). Unfortunately the HTML in those files is completely unindented.
I'd like to run tidy to re-indent the file, but tidy tries to do a lot of other things that I don't want it to do. The only modification I want made to the file in indent.
Is there any way to turn off all the other tidy behavior and just have it indent, or another tool (I'm on linux) that I could use to achieve this?
html indent
I have a number of HTML files that contain snippets of HTML code (not full pages, so no body tags, etc). Unfortunately the HTML in those files is completely unindented.
I'd like to run tidy to re-indent the file, but tidy tries to do a lot of other things that I don't want it to do. The only modification I want made to the file in indent.
Is there any way to turn off all the other tidy behavior and just have it indent, or another tool (I'm on linux) that I could use to achieve this?
html indent
html indent
asked Feb 20 '14 at 18:02
Herms
4,12982835
4,12982835
Have you tried adjusting Tidy's Options?
– Ƭᴇcʜιᴇ007
Feb 20 '14 at 18:23
Tidy has a TON of options, and I'm having trouble telling what I need to change. Thus my question. I'm looking for a way to turn everything off except indentation.
– Herms
Feb 20 '14 at 19:16
Or for another tool I can use that will accomplish this if tidy insists on doing too much.
– Herms
Feb 20 '14 at 19:17
So turn off all optined except indent. Tool requests are off-topic in general. Why not use one of MANY on-line HTML tidying sites? Like Tabifier?
– Ƭᴇcʜιᴇ007
Feb 20 '14 at 19:22
Because it's generally frowned upon at my company to use tools that require sending code externally (in this case it shouldn't be an issue but I'm trying to follow the rules).
– Herms
Feb 20 '14 at 19:37
add a comment |
Have you tried adjusting Tidy's Options?
– Ƭᴇcʜιᴇ007
Feb 20 '14 at 18:23
Tidy has a TON of options, and I'm having trouble telling what I need to change. Thus my question. I'm looking for a way to turn everything off except indentation.
– Herms
Feb 20 '14 at 19:16
Or for another tool I can use that will accomplish this if tidy insists on doing too much.
– Herms
Feb 20 '14 at 19:17
So turn off all optined except indent. Tool requests are off-topic in general. Why not use one of MANY on-line HTML tidying sites? Like Tabifier?
– Ƭᴇcʜιᴇ007
Feb 20 '14 at 19:22
Because it's generally frowned upon at my company to use tools that require sending code externally (in this case it shouldn't be an issue but I'm trying to follow the rules).
– Herms
Feb 20 '14 at 19:37
Have you tried adjusting Tidy's Options?
– Ƭᴇcʜιᴇ007
Feb 20 '14 at 18:23
Have you tried adjusting Tidy's Options?
– Ƭᴇcʜιᴇ007
Feb 20 '14 at 18:23
Tidy has a TON of options, and I'm having trouble telling what I need to change. Thus my question. I'm looking for a way to turn everything off except indentation.
– Herms
Feb 20 '14 at 19:16
Tidy has a TON of options, and I'm having trouble telling what I need to change. Thus my question. I'm looking for a way to turn everything off except indentation.
– Herms
Feb 20 '14 at 19:16
Or for another tool I can use that will accomplish this if tidy insists on doing too much.
– Herms
Feb 20 '14 at 19:17
Or for another tool I can use that will accomplish this if tidy insists on doing too much.
– Herms
Feb 20 '14 at 19:17
So turn off all optined except indent. Tool requests are off-topic in general. Why not use one of MANY on-line HTML tidying sites? Like Tabifier?
– Ƭᴇcʜιᴇ007
Feb 20 '14 at 19:22
So turn off all optined except indent. Tool requests are off-topic in general. Why not use one of MANY on-line HTML tidying sites? Like Tabifier?
– Ƭᴇcʜιᴇ007
Feb 20 '14 at 19:22
Because it's generally frowned upon at my company to use tools that require sending code externally (in this case it shouldn't be an issue but I'm trying to follow the rules).
– Herms
Feb 20 '14 at 19:37
Because it's generally frowned upon at my company to use tools that require sending code externally (in this case it shouldn't be an issue but I'm trying to follow the rules).
– Herms
Feb 20 '14 at 19:37
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
There's a similar stackoverflow question that seems to have some decent answers here:
https://stackoverflow.com/questions/7151180/use-html-tidy-to-just-indent-html-code
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
There's a similar stackoverflow question that seems to have some decent answers here:
https://stackoverflow.com/questions/7151180/use-html-tidy-to-just-indent-html-code
add a comment |
up vote
0
down vote
There's a similar stackoverflow question that seems to have some decent answers here:
https://stackoverflow.com/questions/7151180/use-html-tidy-to-just-indent-html-code
add a comment |
up vote
0
down vote
up vote
0
down vote
There's a similar stackoverflow question that seems to have some decent answers here:
https://stackoverflow.com/questions/7151180/use-html-tidy-to-just-indent-html-code
There's a similar stackoverflow question that seems to have some decent answers here:
https://stackoverflow.com/questions/7151180/use-html-tidy-to-just-indent-html-code
answered Nov 26 at 16:12
Weston C
1166
1166
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f719519%2ftidy-command-that-only-fixes-indent%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you tried adjusting Tidy's Options?
– Ƭᴇcʜιᴇ007
Feb 20 '14 at 18:23
Tidy has a TON of options, and I'm having trouble telling what I need to change. Thus my question. I'm looking for a way to turn everything off except indentation.
– Herms
Feb 20 '14 at 19:16
Or for another tool I can use that will accomplish this if tidy insists on doing too much.
– Herms
Feb 20 '14 at 19:17
So turn off all optined except indent. Tool requests are off-topic in general. Why not use one of MANY on-line HTML tidying sites? Like Tabifier?
– Ƭᴇcʜιᴇ007
Feb 20 '14 at 19:22
Because it's generally frowned upon at my company to use tools that require sending code externally (in this case it shouldn't be an issue but I'm trying to follow the rules).
– Herms
Feb 20 '14 at 19:37