Skip to content

Commit

Permalink
Try to fix unit test error.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwill committed Apr 28, 2023
1 parent fbc3604 commit b9604e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Michelf/MarkdownExtra.php
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ protected function _doTable_leadingPipe_callback($matches) {
$head = $matches[1];
$underline = $matches[2];
$content = $matches[3];
$id_class = $matches[4];
$id_class = $matches[4] ?? null;

$content = preg_replace('/^ *[|]/m', '', $content);

Expand Down Expand Up @@ -1226,7 +1226,7 @@ protected function _doTable_callback($matches) {
$head = $matches[1];
$underline = $matches[2];
$content = $matches[3];
$id_class = $matches[4];
$id_class = $matches[4] ?? null;
$attr = [];

// Remove any tailing pipes for each line.
Expand Down Expand Up @@ -1256,7 +1256,7 @@ protected function _doTable_callback($matches) {

// Write column headers.
$table_attr_str = $this->doExtraAttributes('table', $id_class, null, []);
$text = "<table {$table_attr_str}>\n";
$text = "<table$table_attr_str>\n";
$text .= "<thead>\n";
$text .= "<tr>\n";
foreach ($headers as $n => $header) {
Expand Down

0 comments on commit b9604e3

Please sign in to comment.