View/Edit #80:format

Switch to edit mode.

Name(s): format
1:  "Inputs a text list, and outputs it with <BR> and <P> HTML tags."
2:  "Keep track of <PRE> tags, and doesn't touch anything inside."
3:  text = args[1]
4:  pre = 0
5:  for line in [1..length(text) - 1]
6:    pre = pre ? !index(text[line], "</pre>") | index(text[line], "<pre>")
7:    pre || (text[line] = (x = text[line]) ? x + "<BR>" | "<P>")
8:    $command_utils:suspend_if_needed()
9:  endfor
10: return text
11: "Last modified by Dax (#789) on Sun Oct 27 12:54:08 2002 MST."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Hacker (#60)

You are not logged in.

[home | help | who | search | setup | code]