list_state) { case LIST_NONE: break; case LIST_UNORDERED: $ltag = "\n"; break; case LIST_ORDERED: $ltag = "\n"; break; case LIST_DEFINITION: $ltag = "\n"; break; } $this->list_state = LIST_NONE; switch ($state) { case STATE_PARAGRAPH: return "$ltag

\n"; break; case STATE_BLOCKQUOTE: return "$ltag\n"; break; case STATE_PREFORM: return "$ltag\n"; break; case STATE_NOTIKI: return "$ltag\n"; break; } } function do_replace( $line, $mark, $tag ) { // do the regex thingy for things like bold, italic etc // $mark is the magic character, and $tag the HTML tag to insert $regex = '(^| |[(.,])'.$mark.'([^'.$mark.']*)'.$mark.'($| |[.,;:)])'; $replace = '\\1<'.$tag.'>\\2\\3'; return eregi_replace( $regex, $replace, $line ); } function do_list( $line ) { // handle line with list character on it // get magic character and then delete it from the line $listchar = $line{0}; $line = eregi_replace( "^[*#;:] ", "", $line ); // if not in "list mode" then we need to drop the appropriate start tag $tag = ""; if ($this->list_state == LIST_NONE) { switch ($listchar) { case '*': $tag = "