Extension:SimpleTable/1.2a

\n\n", " ", $ret->getText) ); # remove superfluous newlines       return $HTML;    }    /*     * Convert tabbed data into a Wiki-markup table body.     */    private function convertTable($tabbed, $head, $pattern, $applycssborderstyle) {        $wikitab = '';        // Remove initial and final newlines.        $tabbed = trim($tabbed);        // Split the input into lines, and convert each line to table format.        $lines = preg_split('/\n/', $tabbed);        $row = 0;        foreach ($lines as $line) {            $wikitab .= "|-\n";            $bar = strpos($head, 'top') !== false && $row == 0 ? '!' : '|';

if ($applycssborderstyle !== false) { $bar = $bar. 'style="border-style: solid; border-width: 1px" |'; }

$fields = preg_split($pattern, $line); $col = 0; foreach ($fields as $field) { $cbar = strpos($head, 'left') !== false && $col == 0 ? '!' : $bar; $wikitab .= $cbar. " " . $field. "\n"; ++$col; }           ++$row; }       return $wikitab; } }