You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the table render should check the value of row_counter before it increases the value. Currently, I experienced a issue of using the plugin "Dir Plugin". It re-writes its table_open(), but forgets to initial row_counter to zero in general cases. So, the class of the first row is just row, which has a conflict with the bootstrap theme. I tried to initialize the value in its code, but apparently not work (it just died). So, will it be good to check the initialization of row_counter before increasing it? I think this will be more general.
In dokuwiki/inc/parser/xhtml.php
from
function tablerow_open() {
// initialize the cell counter used for classes
$this->_counter['cell_counter'] = 0;
$class = 'row'.$this->_counter['row_counter']++;
$this->doc .= DOKU_TAB.'<tr class="'.$class.'">'.DOKU_LF.DOKU_TAB.DOKU_TAB;
}
to
function tablerow_open() {
// initialize the cell counter used for classes
$this->_counter['cell_counter'] = 0;
if (!isset($this->_counter['row_counter'])) {
$this->_counter['row_counter'] = 0;
}
$class = 'row'.$this->_counter['row_counter']++;
$this->doc .= DOKU_TAB.'<tr class="'.$class.'">'.DOKU_LF.DOKU_TAB.DOKU_TAB;
}
The text was updated successfully, but these errors were encountered:
The Dir Plugin replaces the original table_open() function for adding the class to the opening tag, and therefore meets this issue
PR #1558 has added this feature to DokuWiki's renderer. So Dir Plugin can use now the tabel_open() function again e.g. see lupo49/dokuwiki-plugin-dir#26 .
I think the table render should check the value of row_counter before it increases the value. Currently, I experienced a issue of using the plugin "Dir Plugin". It re-writes its table_open(), but forgets to initial row_counter to zero in general cases. So, the class of the first row is just row, which has a conflict with the bootstrap theme. I tried to initialize the value in its code, but apparently not work (it just died). So, will it be good to check the initialization of row_counter before increasing it? I think this will be more general.
In dokuwiki/inc/parser/xhtml.php
from
to
The text was updated successfully, but these errors were encountered: