summaryrefslogtreecommitdiff
path: root/lib/MyParsedown.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MyParsedown.php')
-rw-r--r--lib/MyParsedown.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/MyParsedown.php b/lib/MyParsedown.php
index cd537bc..85ed9c4 100644
--- a/lib/MyParsedown.php
+++ b/lib/MyParsedown.php
@@ -3,13 +3,18 @@
class MyParsedown extends ParsedownExtended {
public function __construct(
+ ?array $opts = null,
protected bool $useImagePreviews = false
) {
- parent::__construct([
+ $parsedown_opts = [
'tables' => [
'tablespan' => true
]
- ]);
+ ];
+ if (!is_null($opts)) {
+ $parsedown_opts = array_merge($parsedown_opts, $opts);
+ }
+ parent::__construct($parsedown_opts);
$this->InlineTypes['{'][] = 'FileAttach';
$this->InlineTypes['{'][] = 'Image';