Skip to content

Commit 73ad3de

Browse files
committed
Add code block styling
1 parent f69aca2 commit 73ad3de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/templates/MarkdownBootstrapFix.inc.php

+8
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,17 @@
66
*/
77
function MarkdownBootstrapFix(string $v)
88
{
9+
// Tables
910
$v = str_replace('<table>', '<table class="table table-hover table-markdown table-striped">', $v);
11+
12+
// Blockquotes
1013
$v = str_replace('<blockquote>', '<blockquote class="blockquote">', $v);
14+
15+
// Images
1116
$v = str_replace('<img ', '<img class="img-fluid" ', $v);
1217

18+
// Code Blocks
19+
$v = str_replace('<pre><code>', '<pre class="border border-primary p-2 pre-scrollable rounded text-light" style="overflow-y:auto;"><code>', $v);
20+
1321
return $v;
1422
}

0 commit comments

Comments
 (0)