includes/wikiengine/Tables.php
changeset 1073 b19a9bcb6a45
parent 1027 98c052fc3337
child 1081 745200a9cc2a
equal deleted inserted replaced
1072:604213a07ce0 1073:b19a9bcb6a45
    65       $indent_level = strlen( $matches[1] );
    65       $indent_level = strlen( $matches[1] );
    66 
    66 
    67       $attributes = unstripForHTML( $matches[2] );
    67       $attributes = unstripForHTML( $matches[2] );
    68 
    68 
    69       $t[$k] = str_repeat( '<dl><dd>', $indent_level ) .
    69       $t[$k] = str_repeat( '<dl><dd>', $indent_level ) .
    70         '<_paragraph_bypass><table' . fixTagAttributes( $attributes, 'table' ) . '>' ;
    70         '<table' . fixTagAttributes( $attributes, 'table' ) . '>' ;
    71       array_push ( $td , false ) ;
    71       array_push ( $td , false ) ;
    72       array_push ( $ltd , '' ) ;
    72       array_push ( $ltd , '' ) ;
    73       array_push ( $tr , false ) ;
    73       array_push ( $tr , false ) ;
    74       array_push ( $ltr , '' ) ;
    74       array_push ( $ltr , '' ) ;
    75       array_push ( $has_opened_tr, false );
    75       array_push ( $has_opened_tr, false );
    76     }
    76     }
    77     else if ( count ( $td ) == 0 ) { } # Don't do any of the following
    77     else if ( count ( $td ) == 0 ) { } # Don't do any of the following
    78     else if ( '|}' == substr ( $x , 0 , 2 ) ) {
    78     else if ( '|}' == substr ( $x , 0 , 2 ) ) {
    79       $z = "</table></_paragraph_bypass>" . substr ( $x , 2);
    79       $z = "</table>" . substr ( $x , 2);
    80       $l = array_pop ( $ltd ) ;
    80       $l = array_pop ( $ltd ) ;
    81       if ( !array_pop ( $has_opened_tr ) ) $z = "<tr><td></td></tr>" . $z ;
    81       if ( !array_pop ( $has_opened_tr ) ) $z = "<tr><td></td></tr>" . $z ;
    82       if ( array_pop ( $tr ) ) $z = '</tr>' . $z ;
    82       if ( array_pop ( $tr ) ) $z = '</tr>' . $z ;
    83       if ( array_pop ( $td ) ) $z = '</'.$l.'>' . $z ;
    83       if ( array_pop ( $td ) ) $z = '</'.$l.'>' . $z ;
    84       array_pop ( $ltr ) ;
    84       array_pop ( $ltr ) ;