diff --git a/Michelf/MarkdownExtra.php b/Michelf/MarkdownExtra.php index 638e30d..f814cde 100644 --- a/Michelf/MarkdownExtra.php +++ b/Michelf/MarkdownExtra.php @@ -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); @@ -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. @@ -1256,7 +1256,7 @@ protected function _doTable_callback($matches) { // Write column headers. $table_attr_str = $this->doExtraAttributes('table', $id_class, null, []); - $text = "\n"; + $text = "\n"; $text .= "\n"; $text .= "\n"; foreach ($headers as $n => $header) {