]> git.plutz.net Git - clickslide/commitdiff
make "checked" and "selected" keywords interchangeable
authorPaul Hänsch <paul@plutz.net>
Tue, 17 Jul 2018 00:06:10 +0000 (02:06 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 17 Jul 2018 00:06:10 +0000 (02:06 +0200)
html-sh.sed

index d1c70b8cc6ae65ed0083af3b295edd8d47cca16e..514caafccaf81863f5254602f1a495363638e4f0 100755 (executable)
@@ -45,8 +45,8 @@ s;(<[^/][^>]*)>[ \t]*\.([^< \t]+);\1 class="\2">;g;
 s;(<[^/][^>]*)>[ \t]*#([^< \t]+);\1 id="\2">;g;
 s;(<[^/][^>]*)>[ \t]*([^ \t=<]+=("[^"]*"|'[^']*'|[^< \t]*));\1 \2>;g;
 t attribs;
-s;(<input ([^>]+ )?type=(radio|"radio"|'radio')( [^>]+)?)>[ \t]*checked;\1 checked="checked">;g;
-s;(<input ([^>]+ )?type=(checkbox|"checkbox"|'checkbox')( [^>]+)?)>[ \t]*checked;\1 checked="checked">;g;
+s;(<input ([^>]+ )?type=(radio|"radio"|'radio')( [^>]+)?)>[ \t]*(checked|selected);\1 checked="checked">;g;
+s;(<input ([^>]+ )?type=(checkbox|"checkbox"|'checkbox')( [^>]+)?)>[ \t]*(checked|selected);\1 checked="checked">;g;
 s;(<option( [^>]+)?)>[ \t]*(checked|selected);\1 selected="selected">;g;
 s;(<select( [^>]+)?)>[ \t]*multiple;\1 multiple="multiple">;g;
 t attribs;