1
0
Fork 0
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:
Starbeamrainbowlabs 2020-06-04 01:42:29 +01:00
parent 90a2a3f6c6
commit 79ddc234d2
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 5 additions and 1 deletions

View file

@ -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)
- 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

View file

@ -1244,7 +1244,8 @@ class PeppermintParsedown extends ParsedownExtra
global $settings;
$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))
return $result;