Switch to edit mode.
Name(s): find_tag_contents1: "Copied from Tool (#2774):find_tag_contents by Raptor (#6319)May 25 21:11:39 1998" 2: ":find_tag_contents(str HTML-Tag, list HTML-Document) => STR" 3: "" 4: "Finds and returns the content of a given HTML tag (encapsulated tags only, such as <title>..</title>), or 0 if no such tag was found." 5: {tag, lines} = args 6: stag = "<" + tag + ">" 7: etag = "</" + tag + ">" 8: part = "" 9: for x in (lines) 10: if (i = index(x, stag) || part) 11: if (ei = index(x, etag)) 12: return part + x[part ? 1 | i + length(stag)..ei - 1] 13: else 14: part = part + x[part ? 1 | i + length(stag)..$] 15: continue 16: endif 17: elseif (part) 18: part = part + x 19: endif 20: $command_utils:suspend_if_needed() 21: endfor 22: return 0 23: "This verb previously owned by Raptor (#6319), and chowned to $slacker upon dewizarding (Sat Aug 17 14:48:42 2002 MDT)." 24: "Last modified by Dax (#789) on Sat Aug 17 14:48:42 2002 MDT."