Fix style nesting bug in help
parent
b387066357
commit
219a3a4a40
|
@ -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.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: arrays definitions generic io kernel assocs hashtables
|
USING: arrays definitions generic io kernel assocs hashtables
|
||||||
namespaces parser prettyprint sequences strings io.styles
|
namespaces parser prettyprint sequences strings io.styles
|
||||||
|
@ -42,9 +42,9 @@ M: f print-element drop ;
|
||||||
[ print-element ] with-style ;
|
[ print-element ] with-style ;
|
||||||
|
|
||||||
: with-default-style ( quot -- )
|
: with-default-style ( quot -- )
|
||||||
default-style get [
|
default-span-style get [
|
||||||
last-element off
|
last-element off
|
||||||
default-style get swap with-nesting
|
default-block-style get swap with-nesting
|
||||||
] with-style ; inline
|
] with-style ; inline
|
||||||
|
|
||||||
: print-content ( element -- )
|
: print-content ( element -- )
|
||||||
|
|
|
@ -3,13 +3,17 @@
|
||||||
USING: io.styles namespaces ;
|
USING: io.styles namespaces ;
|
||||||
IN: help.stylesheet
|
IN: help.stylesheet
|
||||||
|
|
||||||
SYMBOL: default-style
|
SYMBOL: default-span-style
|
||||||
H{
|
H{
|
||||||
{ font "sans-serif" }
|
{ font "sans-serif" }
|
||||||
{ font-size 12 }
|
{ font-size 12 }
|
||||||
{ font-style plain }
|
{ font-style plain }
|
||||||
|
} default-span-style set-global
|
||||||
|
|
||||||
|
SYMBOL: default-block-style
|
||||||
|
H{
|
||||||
{ wrap-margin 500 }
|
{ wrap-margin 500 }
|
||||||
} default-style set-global
|
} default-block-style set-global
|
||||||
|
|
||||||
SYMBOL: link-style
|
SYMBOL: link-style
|
||||||
H{
|
H{
|
||||||
|
|
Loading…
Reference in New Issue