@verb #280:"render_tokens render_tokens_suspended" this none this rxdo #789 @program #280:"render_tokens render_tokens_suspended" this none this "Copied from Generic Connectable Object (#24):render by Dax (#789)Dec 29 13:14:04 1999" {data, @extra} = args output = {""} tag = "" cc = 0 for x in (data) cc = cc + 1 if (typeof(x) == $STR) if (!tag && `x[1] ! E_RANGE' == "<") tag = x[2..$ - 1] else output[$] = output[$] + x endif else chunk = {@this:(verb)(x, @extra, cc)} output[$] = output[$] + chunk[1] length(chunk) > 1 && (output = {@output, @chunk[2..$]}) endif endfor if (tag) name = tag[1..(index(tag, " ") || $ + 1) - 1] "" "Black magic on the next line, reconstructs the actual 'html' originally belonging to this text as best it can." "" "Black magic no longer required." " original = (length(output) == 1) ? {tostr(\"<\", tag, \">\", output[1], \"</\", tag, \">\")} | {tostr(\"<\", tag, \">\", output[1]), @output[2..$ - 1], tostr(output[$], \"</\", name, \">\")};" original = "" "" "End Black Magic --Cecil" "" output = this:has_verb("render_" + name) ? this:("render_" + name)(output, tag, @extra) | this:handle_unknown_tag(output, tag, original) "Changed by Cecil to make it uglier (it calls handle_unknown_tag instead of render_*)" "This makes adding new renders easier, and allows simplification of an even uglier block of code that was originally in $connectable:html2text." endif return output "Last modified by Dax (#789) on Tue May 3 13:43:08 2005 MDT." .