-
Notifications
You must be signed in to change notification settings - Fork 418
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
drop-empty-elements is not removing empty Table elements #923
Comments
@rovo79, thank you for the issue, but at this time do not understand what you want, expect... In this markdown formatted issues, you need to use a backticks, to escape the likes of But in HTML, <table border="2">
<tr>
<th>Col 1</th><th>Col 2</th><th>Col 3</th>
</tr>
<tr>
<td>Yes</td><td></td><td>No</td>
</tr>
<tr>
<td></td><td>Empty</td><td></td>
</tr>
<tr>
<td></td><td></td><td></td><td>4</td>
</tr>
</table> You will note, not only will tidy not discard empty element, but does not even warn about the last row having an 4th col overrun... Yes, our docs drop-empty-elements only has simple "This option specifies if Tidy should discard empty elements.". Maybe we could add "if possible", or something like that, to indicate that it does not apply to all Please explain what you think is wrong... thanks... Meantime closing this issue, but will re-open, if an issue is exposed, identified... thanks... |
@geoffmcl I appreciate your time having looked at and deciphered my inquiry. I meant this more as a support request. I agree with you that simply removing all empty elements in an HTML table could be problematic. In my case, the Editors I'm working with, utilize blank elements in their Word Doc to aid with formatting the layout of their Tables in a very specific way. This results in me having nonstandard HTML tables. I'm just trying to find an automated way to clean them out. |
@rovo79, thanks for the further feedback... but, some points to consider... Fact: One of the purposes of tidy is to try to You state - some editors, (un-named) - But this conversation is without specific sample HTML code... Maybe, if you added a small sample, show what tidy (version) presently does, using a config of A, B, C..., then show what you expect... might help me understand if there is a valid FR here... thanks... OT: Regarding an |
Thanks very much. I'll read up on SED. As for an example of what I'm working with:
|
@rovo79, wow, what an example... but you do not show what you expect, after processing with It is a perfect example of how difficult it would be to just deleting the empty Saving the sample html as in_925.html, and run Some images might make it clear - first is just the above sample - all columns nicely aligned, 2nd is with the border: Again it comes back to what do you expect? And some images would also help... thanks... PS: And sorry I got the |
Running tidy 5.6 on Mac OS using CLI
Command run:
tidy test-output.html > droptables.html --drop-empty-elements yes
In the HTML, there are empty Table elements like .
It doesn't remove them.
The text was updated successfully, but these errors were encountered: