Fix style nesting bug in help

db4
Slava Pestov 2008-03-07 02:28:45 -06:00
parent b387066357
commit 219a3a4a40
2 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,4 @@
! Copyright (C) 2005, 2007 Slava Pestov.
! Copyright (C) 2005, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays definitions generic io kernel assocs hashtables
namespaces parser prettyprint sequences strings io.styles
@ -42,9 +42,9 @@ M: f print-element drop ;
[ print-element ] with-style ;
: with-default-style ( quot -- )
default-style get [
default-span-style get [
last-element off
default-style get swap with-nesting
default-block-style get swap with-nesting
] with-style ; inline
: print-content ( element -- )

8
extra/help/stylesheet/stylesheet.factor Normal file → Executable file
View File

@ -3,13 +3,17 @@
USING: io.styles namespaces ;
IN: help.stylesheet
SYMBOL: default-style
SYMBOL: default-span-style
H{
{ font "sans-serif" }
{ font-size 12 }
{ font-style plain }
} default-span-style set-global
SYMBOL: default-block-style
H{
{ wrap-margin 500 }
} default-style set-global
} default-block-style set-global
SYMBOL: link-style
H{