From: Neil B. <ne...@cs...> - 2000-10-06 23:56:25
|
Steve, here is another patch, which I am cc:ing to phpwiki-talk (I hope that is not inappropriate). It allows DefinitionLists to be nested in the same what at Orders and Unordered Lists can be. I really wanted this for http://kernelbook.sourceforge.net:80/wiki/?DentryStructure (see the definition of d_flags) so I thought I would try to make sure that it is available in the next version. NeilBrown --- ./wiki_transform.php3 2000/10/06 02:21:24 1.1 +++ ./wiki_transform.php3 2000/10/06 02:25:45 1.2 @@ -200,9 +200,10 @@ } // HTML modes: pre, unordered/ordered lists, term/def - if (preg_match("/(^\t)(.*?)(:\t)(.*$)/", $tmpline, $matches)) { + if (preg_match("/(^\t+)(.*?)(:\t)(.*$)/", $tmpline, $matches)) { // this is a dictionary list item - $html .= SetHTMLOutputMode("dl", SINGLE_DEPTH, 1); + $numtabs = strlen($matches[1]); + $html .= SetHTMLOutputMode("dl", SINGLE_DEPTH, $numtabs); $tmpline = "<dt>" . $matches[2] . "<dd>" . $matches[4]; // oops, the \d needed to be \d+, thanks al...@mi... |