]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- match href='link', allow different style of hrefs in the same document
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 5 Apr 2004 20:24:41 +0000 (20:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    pldnotify.awk -> 1.42

pldnotify.awk

index 706ff3b0c24d25eeab34d7e5a41b64eaf53004d4..637bb141597d8d8d500910c49e5530ebd58fddb0 100644 (file)
@@ -159,9 +159,9 @@ function get_links(url,     errno,link,oneline,retval,odp,tmpfile) {
                        if (tolower(odp) ~ /<frame[ \t]/) {
                                match(tolower(odp),/<frame[ \t][^>]*>/)
                                ramka=substr(odp,RSTART,RLENGTH)
-                               odp=substr(odp,RSTART+RLENGTH)
+                               odp=substr(odp,1,RSTART) substr(odp,RSTART+RLENGTH)
                                sub(/[sS][rR][cC]=[ \t]*/,"src=",ramka);
-                               match(tolower(ramka),/src="[^"]+"/)
+                               match(ramka,/src="[^"]+"/)
                                newurl=substr(ramka,RSTART+5,RLENGTH-6)
                                if (DEBUG) print "Ramka: " newurl
                                if (newurl !~ /\//) {
@@ -170,17 +170,24 @@ function get_links(url,   errno,link,oneline,retval,odp,tmpfile) {
                                }
                                retval=(retval " " get_links(newurl))
                        } else if (tolower(odp) ~ /href=[ \t]*"[^"]+"/) {
-                               sub(/[hH][rR][eE][fF]=[ \t]*/,"href=",odp)
-                               match(tolower(odp),/href="[^"]+"/)
+                               sub(/[hH][rR][eE][fF]=[ \t]*"/,"href=\"",odp)
+                               match(odp,/href="[^"]+"/)
+                               link=substr(odp,RSTART,RLENGTH)
+                               odp=substr(odp,1,RSTART) substr(odp,RSTART+RLENGTH)
+                               link=substr(link,7,length(link)-7)
+                               retval=(retval " " link)
+                       } else if (tolower(odp) ~ /href=[ \t]*'[^']+'/) {
+                               sub(/[hH][rR][eE][fF]=[ \t]*'/,"href='",odp)
+                               match(odp,/href='[^']+'/)
                                link=substr(odp,RSTART,RLENGTH)
-                               odp=substr(odp,RSTART+RLENGTH)
+                               odp=substr(odp,1,RSTART) substr(odp,RSTART+RLENGTH)
                                link=substr(link,7,length(link)-7)
                                retval=(retval " " link)
                        } else if (tolower(odp) ~ /href=[ \t]*[^ \t>]+/) {
                                sub(/[hH][rR][eE][fF]=[ \t]*/,"href=",odp)
-                               match(tolower(odp),/href=[^ \t>]+/)
+                               match(odp,/href=[^ \t>]+/)
                                link=substr(odp,RSTART,RLENGTH)
-                               odp=substr(odp,RSTART+RLENGTH)
+                               odp=substr(odp,1,RSTART) substr(odp,RSTART+RLENGTH)
                                link=substr(link,6,length(link)-5)
                                retval=(retval " " link)
                        } else {
This page took 0.034679 seconds and 4 git commands to generate.