]> git.plutz.net Git - clickslide/commitdiff
bigfix: handling of [foo].bar
authorPaul Hänsch <paul@plutz.net>
Mon, 16 Jul 2018 23:22:51 +0000 (01:22 +0200)
committerPaul Hänsch <paul@plutz.net>
Mon, 16 Jul 2018 23:22:51 +0000 (01:22 +0200)
html-sh.sed

index 1f988b3965d0eefc9c620eaa23de2c8350c86668..d7a757332d50eefb4317a45e360bbf9dad4158ca 100755 (executable)
@@ -40,14 +40,14 @@ t tagopen;
 G; h; s;^[^\n]*\n+;;; x; s;\n.*$;;;
 
 :attribs
 G; h; s;^[^\n]*\n+;;; x; s;\n.*$;;;
 
 :attribs
-s;class="([^>]+)>[ \t]+\.([^< \t]+);class="\2 \1>;g; t attribs;
-s;>[ \t]+\.([^< \t]+); class="\1">;g;
-s;>[ \t]+#([^< \t]+); id="\1">;g;
-s;>[ \t]+([^ \t=<]+=("[^"]*"|'[^']*'|[^< \t]*)); \1>;g;
+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;(<[^/][^>]*)>[ \t]*([^ \t=<]+=("[^"]*"|'[^']*'|[^< \t]*));\1 \2>;g;
 t attribs;
 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;(<option( [^>]+))>[ \t]+(checked|selected);\1 selected="selected">;g;
+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;(<option( [^>]+)?)>[ \t]*(checked|selected);\1 selected="selected">;g;
 t attribs;
 
 s;(<[^/][^>]*>)[ \t]*;\1;g;
 t attribs;
 
 s;(<[^/][^>]*>)[ \t]*;\1;g;