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

Option to automatically tidy warnings #3

Closed
yamilethmedina opened this issue Apr 3, 2017 · 3 comments
Closed

Option to automatically tidy warnings #3

yamilethmedina opened this issue Apr 3, 2017 · 3 comments

Comments

@yamilethmedina
Copy link

So far, i'm loving this app. I was just wondering if there was an option that would force Tidy to make the Warning changes shown in the messages? I'm working on an existing website that was done pre-HTML5, so it has attributes like <img align and <td width, etc. Currently, Tidy points them out for me, but they're still in the Tidy HTML and I have to remove them from the source myself. I was looking in the help docs, but i'm not sure if there is an option to automatically make Tidy edit the HTML to reflect the warnings as well.

I understand why it's not the default (potential data loss), but if there was a toggle for that ability or a button that would do it when you requested, that would be very helpful in streamlining the process.

@balthisar
Copy link
Owner

I think what you want is "drop-proprietary-attributes" and "strict-tags-attributes" together, and, of course, output to html 5 ("doctype" to "auto" should do the trick), and, finally, because they're considered "errors" with these options, finally use "force-output" to "yes".

The great thing that inspired Balthisar Tidy all those many years ago was exactly for the situation you're running into -- what combination of Tidy's options provides the desired output? It's not always intuitive.

Anyway, let me know if this works or doesn't work for you.

@yamilethmedina
Copy link
Author

@balthisar Thanks! I was a bit unfamiliar with the settings, but that does the trick. This will really help me out 😃

@balthisar
Copy link
Owner

Great! Glad it worked.

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