Commit a2ad021e authored by Tobias Buckdahn's avatar Tobias Buckdahn

Add row header fields for markdown tables

parent 51e719d5
......@@ -40,6 +40,7 @@ class BrickCamp extends Theme
$raw_content = $page->content();
$raw_content = preg_replace('/<table>/', '<div class="table-responsive"><table class="table table-sm table-striped table-bordered text-center">', $raw_content);
$raw_content = preg_replace('/<th>/', '<th scope="col">', $raw_content);
$raw_content = preg_replace('/<tr>[^<]*<td>([^<]*)<\/td>/', '<tr><th scope="col">$1</th>', $raw_content);
$raw_content = preg_replace('/<\/table>/', '</table></div>', $raw_content);
$page->setRawContent($raw_content);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment