]> gitweb.factorcode.org Git - factor.git/commitdiff
return links as URL objects in html vocab
authorDoug Coleman <erg@jobim.local>
Sat, 4 Apr 2009 02:15:52 +0000 (21:15 -0500)
committerDoug Coleman <erg@jobim.local>
Sat, 4 Apr 2009 02:15:52 +0000 (21:15 -0500)
extra/html/parser/analyzer/analyzer.factor

index 54b8c8fc69d28a1befb29ee7889803f629ed3c30..2196f1baaa1493ab4ce485548e9b0c0dac3439b6 100755 (executable)
@@ -127,11 +127,13 @@ TUPLE: link attributes clickable ;
         [ name>> "a" = ]
         [ attributes>> "href" swap key? ] bi and ] filter
     ] map sift
-    [ [ attributes>> "href" swap at ] map ] map concat ;
+    [ [ attributes>> "href" swap at ] map ] map concat
+    [ >url ] map ;
 
 : find-frame-links ( vector -- vector' )
     [ name>> "frame" = ] find-between-all
-    [ [ attributes>> "src" swap at ] map sift ] map concat sift ;
+    [ [ attributes>> "src" swap at ] map sift ] map concat sift
+    [ >url ] map ;
 
 : find-all-links ( vector -- vector' )
     [ find-hrefs ] [ find-frame-links ] bi append prune ;