All pastes #269950 Raw Edit

first

public text v1 · immutable
·published 2006-12-06 23:13 UTC
rendered paste body
                # set tag attributes, if any, and create a list
                set tagattr [join [lrange $linelist 1 end]];
                regsub -all {(.*?)="(.*?)"} $tagattr "\\1 {\\2} " tagattr;

                # make sure the attributes is in lower-case
                if {![string equal $tagattr ""]}\
                {
                        set tmp "";
                        foreach "a b" $tagattr\
                        {
                                lappend tmp [string tolower $a];
                                lappend tmp $b;
                        }

                        set tagattr $tmp;
                }