help.html: don't use sprintf.

flac
John Benediktsson 2020-02-22 20:40:11 -08:00 committed by Steve Ayerhart
parent 75b1fbd6f4
commit 451fb09795
No known key found for this signature in database
GPG Key ID: 5BFD39C5359E967D
2 changed files with 5 additions and 4 deletions

View File

@ -1,8 +1,8 @@
! Copyright (C) 2008, 2011 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs combinators.short-circuit
debugger formatting fry help help.home help.topics help.vocabs
html html.streams io.directories io.encodings.binary
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 regexp sequences
sequences.deep serialize sorting splitting tools.completion
@ -93,7 +93,8 @@ M: pathname url-of
: css-style ( style -- style' )
R/ font-size: \d+pt;/ [
"font-size: " ?head drop "pt;" ?tail drop
string>number 12 / "font-size: %frem;" sprintf
string>number 12 /f number>string
"font-size: " "rem; " surround
] re-replace-with ;
: css-classes ( classes -- stylesheet )

View File

@ -52,5 +52,5 @@ tr:hover {
.page {
margin: 20px;
max-width: 800px;
line-height: 150%;
line-height: 140%;
}