Skip to content

Commit b9604e3

Browse files
committed
Try to fix unit test error.
1 parent fbc3604 commit b9604e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: Michelf/MarkdownExtra.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ protected function _doTable_leadingPipe_callback($matches) {
11961196
$head = $matches[1];
11971197
$underline = $matches[2];
11981198
$content = $matches[3];
1199-
$id_class = $matches[4];
1199+
$id_class = $matches[4] ?? null;
12001200

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

@@ -1226,7 +1226,7 @@ protected function _doTable_callback($matches) {
12261226
$head = $matches[1];
12271227
$underline = $matches[2];
12281228
$content = $matches[3];
1229-
$id_class = $matches[4];
1229+
$id_class = $matches[4] ?? null;
12301230
$attr = [];
12311231

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

12571257
// Write column headers.
12581258
$table_attr_str = $this->doExtraAttributes('table', $id_class, null, []);
1259-
$text = "<table {$table_attr_str}>\n";
1259+
$text = "<table$table_attr_str>\n";
12601260
$text .= "<thead>\n";
12611261
$text .= "<tr>\n";
12621262
foreach ($headers as $n => $header) {

0 commit comments

Comments
 (0)