diff --git a/extra/html/parser/analyzer/analyzer.factor b/extra/html/parser/analyzer/analyzer.factor index ffae26eb8a..9303b81055 100755 --- a/extra/html/parser/analyzer/analyzer.factor +++ b/extra/html/parser/analyzer/analyzer.factor @@ -1,5 +1,5 @@ -USING: assocs http.parser kernel math sequences strings ; -IN: http.parser.analyzer +USING: assocs html.parser kernel math sequences strings ; +IN: html.parser.analyzer : remove-blank-text ( vector -- vector' ) [ @@ -87,5 +87,5 @@ IN: http.parser.analyzer ! clear "/Users/erg/web/hostels.html" contents parse-html "Currency" "name" pick find-first-attribute-key-value ! clear "/Users/erg/web/hostels.html" contents parse-html -! "Currency" "name" pick find-first-attribute-key-value +! "Currency" "name" pick find-first-attribute-key-value ! pick find-between remove-blank-text diff --git a/extra/html/parser/parser-tests.factor b/extra/html/parser/parser-tests.factor index b4cd87d542..c490b737d9 100644 --- a/extra/html/parser/parser-tests.factor +++ b/extra/html/parser/parser-tests.factor @@ -1,4 +1,4 @@ -USING: browser.parser kernel tools.test ; +USING: html.parser kernel tools.test ; IN: temporary [ diff --git a/extra/html/parser/parser.factor b/extra/html/parser/parser.factor index 77a0580132..7057cfe61e 100644 --- a/extra/html/parser/parser.factor +++ b/extra/html/parser/parser.factor @@ -1,7 +1,7 @@ -USING: arrays http.parser.utils hashtables io kernel +USING: arrays html.parser.utils hashtables io kernel namespaces prettyprint quotations sequences splitting state-parser strings ; -IN: http.parser +IN: html.parser TUPLE: tag name attributes text matched? closing? ; @@ -120,7 +120,7 @@ SYMBOL: tagstack ] unless ; : parse-attributes ( -- hashtable ) - [ (parse-attributes) ] { } make >hashtable ; + [ (parse-attributes) ] { } make >hashtable ; : (parse-tag) [ diff --git a/extra/html/parser/printer/printer.factor b/extra/html/parser/printer/printer.factor index 3df1a76991..979c27a3e5 100644 --- a/extra/html/parser/printer/printer.factor +++ b/extra/html/parser/printer/printer.factor @@ -1,9 +1,9 @@ -USING: assocs http.parser browser.utils combinators +USING: assocs html.parser html.utils combinators continuations hashtables hashtables.private io kernel math namespaces prettyprint quotations sequences splitting state-parser strings ; -IN: http.parser.printer +IN: html.parser.printer SYMBOL: no-section SYMBOL: html @@ -42,7 +42,7 @@ HOOK: print-closing-named-tag printer ( tag -- ) M: printer print-text-tag ( tag -- ) tag-text write ; -M: printer print-comment-tag ( tag -- ) +M: printer print-comment-tag ( tag -- ) "" write ; @@ -67,7 +67,6 @@ M: printer print-closing-named-tag ( tag -- ) [ swap bl write "=" write ?quote write ] assoc-each ; - M: src-printer print-opening-named-tag ( tag -- ) "<" write @@ -102,7 +101,7 @@ SYMBOL: tablestack [ V{ } clone tablestack set ] with-scope ; - + ! { { 1 2 } { 3 4 } } ! H{ { table-gap { 10 10 } } } [ ! [ [ [ [ . ] with-cell ] each ] with-row ] each diff --git a/extra/html/parser/utils/utils-tests.factor b/extra/html/parser/utils/utils-tests.factor index 9ae54c775f..d39e4eef17 100644 --- a/extra/html/parser/utils/utils-tests.factor +++ b/extra/html/parser/utils/utils-tests.factor @@ -2,7 +2,7 @@ USING: assocs combinators continuations hashtables hashtables.private io kernel math namespaces prettyprint quotations sequences splitting state-parser strings tools.test ; -USING: browser.utils ; +USING: html.utils ; IN: temporary [ "'Rome'" ] [ "Rome" single-quote ] unit-test diff --git a/extra/html/parser/utils/utils.factor b/extra/html/parser/utils/utils.factor index c8d10a0a2b..febd1716ed 100644 --- a/extra/html/parser/utils/utils.factor +++ b/extra/html/parser/utils/utils.factor @@ -2,8 +2,8 @@ USING: assocs circular combinators continuations hashtables hashtables.private io kernel math namespaces prettyprint quotations sequences splitting state-parser strings ; -USING: http.parser ; -IN: http.parser.utils +USING: html.parser ; +IN: html.parser.utils : string-parse-end? get-next not ;