Index: library/lib/pp.tcl =================================================================== diff -u -ra4d79288048b336b38063dc0208ea220d460832f -r0e024a21cf79809c4dc540ae7f87be41fc8de772 --- library/lib/pp.tcl (.../pp.tcl) (revision a4d79288048b336b38063dc0208ea220d460832f) +++ library/lib/pp.tcl (.../pp.tcl) (revision 0e024a21cf79809c4dc540ae7f87be41fc8de772) @@ -195,6 +195,15 @@ # nx::Object create nx::pp { + :public method toHTML {block} { + set state [self]::default + set l [string length $block] + for {set i 0} {$i < $l} {incr i} { + set state [$state process [string index $block $i]] + } + $state flush + } + :public method render {block} { set :output "" :puts "" :puts "
"
-    set state [self]::default
-    
-    set l [string length $block]
-    for {set i 0} {$i < $l} {incr i} {
-      set state [$state process [string index $block $i]]
-    }
-    $state flush
+    :toHTML $block
     :puts "
\n" return ${:output} }