From 619736fd241e830980b303591b0d809c812b1718 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Tue, 12 Oct 2010 09:04:10 +0200 Subject: Improve compatibility of table instructions handling --- inc/parser/xhtml.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'inc/parser/xhtml.php') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 5a3d945d1..37900b2c3 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -902,16 +902,23 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } // $numrows not yet implemented - function table_open($maxcols = NULL, $numrows = NULL, $pos){ + function table_open($maxcols = null, $numrows = null, $pos = null){ global $lang; // initialize the row counter used for classes $this->_counter['row_counter'] = 0; - $this->doc .= '
'.DOKU_LF; + $class = 'table'; + if ($pos !== null) { + $class .= ' ' . $this->startSectionEdit($pos, 'table'); + } + $this->doc .= '
' . + DOKU_LF; } - function table_close($pos){ + function table_close($pos = null){ $this->doc .= '
'.DOKU_LF; - $this->finishSectionEdit($pos); + if ($pos !== null) { + $this->finishSectionEdit($pos); + } } function tablerow_open(){ -- cgit v1.2.3