Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv27056/lib
Modified Files:
transform.php
Log Message:
clean up of SetHTMLMode() -- patch from Neil Brown
Index: transform.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/transform.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** transform.php 2001/02/04 18:22:34 1.9
--- transform.php 2001/02/07 16:38:33 1.10
***************
*** 91,95 ****
} elseif ($tagtype == NESTED_LEVEL) {
! if ($level < $this->stack->cnt()) {
// $tag has fewer nestings (old: tabs) than stack,
// reduce stack to that tab count
--- 91,95 ----
} elseif ($tagtype == NESTED_LEVEL) {
! if ($level <= $this->stack->cnt()) {
// $tag has fewer nestings (old: tabs) than stack,
// reduce stack to that tab count
***************
*** 111,115 ****
}
! } elseif ($level > $this->stack->cnt()) {
// we add the diff to the stack
// stack might be zero
--- 111,115 ----
}
! } else { // $level > $this->stack->cnt()
// we add the diff to the stack
// stack might be zero
***************
*** 122,139 ****
}
}
-
- } else { // $level == $stack->cnt()
- if ($tag == $this->stack->top()) {
- return; // same tag? -> nothing to do
- } else {
- // different tag - close old one, add new one
- $closetag = $this->stack->pop();
- $retvar .= "</$closetag>\n";
- $retvar .= "<$tag>\n";
- $this->stack->push($tag);
- }
}
-
} else { // unknown $tagtype
ExitWiki ("Passed bad tag type value in SetHTMLOutputMode");
--- 122,127 ----
|