html.parser.printer: use with-variables instead of with-scope.
parent
5a0e583279
commit
c1cdc2318f
|
@ -93,12 +93,11 @@ SYMBOL: tab-width
|
||||||
SYMBOL: #indentations
|
SYMBOL: #indentations
|
||||||
|
|
||||||
: prettyprint-html ( vector -- )
|
: prettyprint-html ( vector -- )
|
||||||
[
|
H{
|
||||||
T{ html-prettyprinter } html-printer set
|
{ html-printer T{ html-prettyprinter } }
|
||||||
2 tab-width set
|
{ tab-width 2 }
|
||||||
0 #indentations set
|
{ #indentations 0 }
|
||||||
print-tags
|
} [ print-tags ] with-variables ;
|
||||||
] with-scope ;
|
|
||||||
|
|
||||||
: tabs ( -- vseq )
|
: tabs ( -- vseq )
|
||||||
tab-width get #indentations get 0 max * CHAR: \s <repetition> ;
|
tab-width get #indentations get 0 max * CHAR: \s <repetition> ;
|
||||||
|
|
Loading…
Reference in New Issue