G; h; s;^[^\n]*\n+;;; x; s;\n.*$;;;
:attribs
-s;(<[^/][^>]*)>[ \t]*\.[ \t];\1>;g; t attEnd;
s;class="([^>]+)>[ \t]*\.([^< \t]+);class="\2 \1>;g; t attribs;
s;(<[^/][^>]*)>[ \t]*\.([^< \t]+);\1 class="\2">;g;
s;(<[^/][^>]*)>[ \t]*#([^< \t]+);\1 id="\2">;g;
s;(<option( [^>]+)?)>[ \t]*(checked|selected);\1 selected="selected">;g;
s;(<select( [^>]+)?)>[ \t]*multiple;\1 multiple="multiple">;g;
t attribs;
-:attEnd
+s;(<[^/][^>]*>)[ \t]*\.[ \t];\1;g;
s;(<[^/][^>]*>)[ \t]*;\1;g;
# s;(<[^/][^>]*)>[ \t]*</[^>]+>;\1/>;g;