help.html: support style/class replacement in more tags.

flac
John Benediktsson 2020-02-15 10:27:22 -08:00 committed by Steve Ayerhart
parent ddcc147e24
commit 53122102ee
No known key found for this signature in database
GPG Key ID: 5BFD39C5359E967D
1 changed files with 7 additions and 8 deletions

View File

@ -5,8 +5,8 @@ debugger fry help help.home help.topics help.vocabs html
html.streams io.directories io.encodings.binary
io.encodings.utf8 io.files io.files.temp io.pathnames kernel
locals make math math.parser memoize namespaces sequences
serialize sorting splitting tools.completion vocabs
vocabs.hierarchy words xml.data xml.syntax xml.traversal
sequences.deep serialize sorting splitting tools.completion
vocabs vocabs.hierarchy words xml.data xml.syntax xml.traversal
xml.writer ;
FROM: io.encodings.ascii => ascii ;
FROM: ascii => ascii? ;
@ -75,8 +75,8 @@ M: pathname url-of
"conventions" >link topic>filename
[XML
<div class="navbar">
<a href="http://factorcode.org">Factor</a>
<a href="/">Documentation</a>
<a href="http://factorcode.org">factorcode.org</a>
<a href="/">Handbook</a>
<a href=<->>Glossary</a>
<form method="get" action="/search" style="display:inline;">
<input placeholder="Search" name="search" type="text"/>
@ -100,10 +100,9 @@ M: pathname url-of
H{ } clone :> classes
body [
dup xml-chunk? [
seq>> [ tag? ] filter
"span" "div" [ deep-tags-named ] bi-curry@ bi append
[
seq>> [
dup {
[ tag? ]
[ "style" attr ]
[ "class" attr not ]
} 1&& [
@ -111,7 +110,7 @@ M: pathname url-of
"style" over delete-at* drop classes css-class
"class" rot set-at
] [ drop ] if
] each
] deep-each
] [ drop ] if
] each classes sort-values css-classes body ;