Sorry,
Didn't test enough. This one works for non-interp .tml substs.
Colin.
24d23
<
739a739,753
> if {[string length $interp] == 0} {
> if {[string length [info proc on_error]]} {
> set code [catch {
> on_error $code $errorCode $errorInfo $html
> } html]
> }
> } elseif {[string length [interp eval $interp info proc on_error]]} {
> set code [catch {
> interp eval $interp on_error $code $errorCode $errorInfo $html
> } html]
> }
> }
>
> if {$code != 0} {
> global errorCode errorInfo
890a905
> set result ""
892c907,914
< set result [uplevel #0 [list subst $script]]
---
> if {[string length [info proc pre_subst]]} {
> append result [uplevel #0 [list pre_subst $script]]
> }
> append result [uplevel #0 [list subst $script]]
> if {[string length [info proc post_subst]]} {
> append result [uplevel #0 [list post_subst $script]]
> }
>
894c916,922
< set result [interp eval $interp [list subst $script]]
---
> if {[string length [interp eval $interp info proc pre_subst]]} {
> append result [interp eval $interp [list pre_subst $script]]
> }
> append result [interp eval $interp [list subst $script]]
> if {[string length [interp eval $interp info proc post_subst]]} {
> append result [interp eval $interp [list post_subst $script]]
> }