balthisar / tidy

Balthisar Tidy for macOS HTML Cleaner
https://www.balthisar.com/software/tidy
23 stars 7 forks source link

Option to automatically tidy warnings #3

Closed yamilethmedina closed 7 years ago

yamilethmedina commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

balthisar commented 7 years ago

Great! Glad it worked.