Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

Commit

Permalink
make it possible to disable block and inline types (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsmith77 authored and eagostini committed Jan 6, 2020
1 parent f9151ba commit ab76e0d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Providers/ParsedownServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ public function register(): void
Config::get('parswdown.urls_linked')
);

$parsedown->setDisabledBlockTypes(
Config::get('parsedown.disabled_block_types')
);

$parsedown->setDisabledInlineTypes(
Config::get('parsedown.disabled_inline_types')
);

return $parsedown;
});

Expand Down
14 changes: 14 additions & 0 deletions src/Support/parsedown.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,18 @@
* @see https://github.com/erusev/parsedown/wiki/Usage
*/
'urls_linked' => true,

/**
* Tells **Parsedown** which block types to disable.
*
* @see https://github.com/erusev/parsedown/wiki/Usage
*/
'disabled_block_types' => [],

/**
* Tells **Parsedown** which inline types to disable.
*
* @see https://github.com/erusev/parsedown/wiki/Usage
*/
'disabled_inline_types' => [],
];

0 comments on commit ab76e0d

Please sign in to comment.