1 ! Copyright (C) 2005, 2007 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: arrays definitions generic assocs
4 io kernel namespaces prettyprint prettyprint.sections
5 sequences words summary classes help.topics help.markup ;
8 : article-children ( topic -- seq )
9 article-content { $subsection } collect-elements ;
13 { $subsection $link $see-also }
14 collect-elements [ \ f or ] map ;
16 : help-path ( topic -- seq )
17 [ article-parent ] follow rest ;
19 : set-article-parents ( parent article -- )
20 article-children [ set-article-parent ] with each ;
22 : xref-article ( topic -- )
23 dup >link xref dup set-article-parents ;
25 : unxref-article ( topic -- )