« Nvu progress 20040402
- Silicium monster »
By glazou on Friday 2 April 2004, 17:06 - Nvu
You have a RFE for the Markup Cleaner ? Please add a comment!
Not sure this is part of markup, but consider
"remove ", as many programs use them event when not necessary
And why not remove inline styles.
I don't like NVU to set images dimensions in HTML code. I know this is needed for image resizing, but anyway, I only use properly sized images. And when I want to change an image for another one within the properties dialog, it keeps the previous dimensions.
Or event better than removing inline styles, be able to remove some arguments of a specified element, eg :
remove all "id" for <p>, or remove all "style" for img.
I often feel the need for this kind of thing as I mainly use NVU when refactoring/working with other people code, and am sick of switching to emacs to run macros.
HTML Tidy integration;
tidy.sourceforge.net/ it builds and has C++ bindings on the platforms that you are currently supporting (Linux + Windows)
It should be able to rebuild source into new, clean structure tree. Many, many web pages (mostly those created by some server-side) have very unclean code, hard to investigate. Result should be regular - two spaces as a indent, every tag without subtag inside should be in one line, every tag with subtag should have it's own line.
A second most-wanted but probably very hard to do, would be a tool to gather inline styles used on site and pack them into clasess.
I agree with Clayton Scott (HTML Tidy integration) you might also consider adding a backup option.
I'd like a tool to strip out all the garbage formatting that MS Word and Excel add. I'd also like to be able to paste a table without the formatting stuff, but still in the same layout.
So that <td style="border-style: solid solid none none; border-color: windowtext windowtext -moz-use-text-color -moz-use-text-color; border-width: 1pt 1pt medium medium; padding: 0in 5.4pt; width: 104.8pt; height: 14.8pt;" valign="top" width="140"> gets replaced with <td>
I'd really like it if "Paste without formatting" had a "Paste Table without Formatting but still as a Table" variant.
I agree with removal of .
I agree with tidy integration.
Will "Remove empty blocks" also remove empty cells?
Sometimes, there are declarations of align attribute and/or CSS text-align and valign attribute and/or CSS vertical-align in every table cells, which is unneeded (I think this is bug 161607 at bugzilla). Will these be removed and then edited into a .css file instead?
Tidy integration would a must for web dev - but for the Sunday morning dev it may be overkill and add too much code (well I don't know but trying to guess why Daniel is trying to get his own stuff done)... thus who will be the first to propose a Tidy *extension* for NVU? (I'm not sure it can be done, but I'm sure they are people who knows
function append images sizes
to fix missing width/height in img tags
franCk: With sane presets, the Tidy integration would be great even for Sunday morning developers, as You put it. All they'd have to would be to click on a button or a menu saying "Clean up code" and by the arcane magic of the bits and bytes, all the HTML becomes suddenly readable!
Also perhaps another feature (as was mentioned by Gandalf), the ability to extract and collect formatting instructions (both - as deprecated tags/attribute values and inline styles), into page stylesheet, using classes and id's where necessary.
Another proposal (for the somewhat distant future todo list, I guess), that does exactly strictly fall into code cleanup category would be to introduce autocomplete (intellisense) feature for the HTML/CSS source editor and have ability to define code snippet templates much like the ones that programmers are allready enjoing in most recent IDE's.
I'm afraid this is quite a repetitive comment, but... please go for Tidy integration, this tool is a must !
Co-chairman of the W3C CSS Working Group, entrepreneur, software engineer, geek, father of two, polyglot, unashamed French, duck lover. Nah.
Powered by Dotclear