]> gitweb.factorcode.org Git - factor.git/blob - extra/html/parser/analyzer/analyzer-docs.factor
html.parser.analyzer: when matching on classname, check that the tag has the given...
[factor.git] / extra / html / parser / analyzer / analyzer-docs.factor
1 USING: help.syntax help.markup html.parser html.parser.analyzer sequences
2 strings ;
3 IN: html.parser.analyzer
4
5 HELP: html-class?
6 { $values { "tag" tag } { "string" "a classname" } }
7 { $description "t if the tag has the given class." } ;
8
9 HELP: stack-find
10 { $values { "seq" sequence } { "quot" { $quotation "( elt -- 1/0/-1 )" } } { "i/f" "an index or " { $link f } } }
11 { $description "Takes a sequence and a quotation expected to return -1 if the element decrements the stack, 0 if it doesnt affect it and 1 if it increments it. Then finds the first element where the stack is empty." } ;
12
13 HELP: tag-classifier
14 { $values { "string" string } { "quot" { $quotation "( elt -- 1/0/-1 )" } } }
15 { $description "Builds a function that classifies tag tuples. Returns 1 if the tag is an opening tag with the given name, -1 if it is a closing tag and 0 otherwise." } ;