mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Bugfix: Squash warning when determining language in the fenced code block extensions
This commit is contained in:
parent
90a2a3f6c6
commit
79ddc234d2
2 changed files with 5 additions and 1 deletions
|
@ -26,6 +26,9 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
|
||||||
- Don't worry, we've absorbed all the useful features (see above)
|
- Don't worry, we've absorbed all the useful features (see above)
|
||||||
- NOTE TO SELF: Don't forget to update wikimatrix.org when we next make a stable release!
|
- NOTE TO SELF: Don't forget to update wikimatrix.org when we next make a stable release!
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Squashed a warning when using the fenced code block syntax
|
||||||
|
|
||||||
|
|
||||||
## v0.21
|
## v0.21
|
||||||
|
|
||||||
|
|
|
@ -1244,7 +1244,8 @@ class PeppermintParsedown extends ParsedownExtra
|
||||||
global $settings;
|
global $settings;
|
||||||
$result = parent::blockFencedCodeComplete($block);
|
$result = parent::blockFencedCodeComplete($block);
|
||||||
|
|
||||||
$language = preg_replace("/^language-/", "", $block["element"]["element"]["attributes"]["class"]);
|
// Default value: "text"
|
||||||
|
$language = preg_replace("/^language-/", "", $block["element"]["element"]["attributes"]["class"] ?? "language-text");
|
||||||
|
|
||||||
if(!isset($settings->parser_ext_renderers->$language))
|
if(!isset($settings->parser_ext_renderers->$language))
|
||||||
return $result;
|
return $result;
|
||||||
|
|
Loading…
Reference in a new issue