]> git.plutz.net Git - lobster/commitdiff
Squashed 'cgilite/' changes from f0bc458..84e1d69
authorPaul Hänsch <paul@plutz.net>
Mon, 9 Dec 2019 23:47:44 +0000 (00:47 +0100)
committerPaul Hänsch <paul@plutz.net>
Mon, 9 Dec 2019 23:47:44 +0000 (00:47 +0100)
84e1d69 introduce . as stop sign to prevent parsing text as attributes

git-subtree-dir: cgilite
git-subtree-split: 84e1d6938743a21a912420cc4ba5dc08a7c48155

html-sh.sed

index 976d42e814d4f4d836f3bb93df97653f10fd4b48..16aeb9a44e907814b5865fb9887fbe9833f450d8 100755 (executable)
@@ -48,6 +48,7 @@ t tagopen;
 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;
@@ -58,6 +59,7 @@ s;(<input ([^>]+ )?type=(checkbox|"checkbox"|'checkbox')( [^>]+)?)>[ \t]*(checke
 s;(<option( [^>]+)?)>[ \t]*(checked|selected);\1 selected="selected">;g;
 s;(<select( [^>]+)?)>[ \t]*multiple;\1 multiple="multiple">;g;
 t attribs;
+:attEnd
 
 s;(<[^/][^>]*>)[ \t]*;\1;g;
 # s;(<[^/][^>]*)>[ \t]*</[^>]+>;\1/>;g;