diff --git a/src/flextype/Support/Parsers/Markdown.php b/src/flextype/Support/Parsers/Markdown.php index 490f4e9ba..07f3612e1 100644 --- a/src/flextype/Support/Parsers/Markdown.php +++ b/src/flextype/Support/Parsers/Markdown.php @@ -60,7 +60,7 @@ public function __wakeup(): void */ protected function __construct() { - $config = flextype('registry')->get('flextype.settings.parsers.markdown'); + $config = registry()->get('flextype.settings.parsers.markdown'); $this->environment = Environment::createCommonMarkEnvironment(); $this->environment->addExtension(new AttributesExtension()); $this->environment->addExtension(new TableExtension()); @@ -106,15 +106,15 @@ public static function getInstance(): Markdown */ public function parse(string $input, bool $cache = true) { - if ($cache === true && flextype('registry')->get('flextype.settings.cache.enabled') === true) { + if ($cache === true && registry()->get('flextype.settings.cache.enabled') === true) { $key = $this->getCacheID($input); - if ($dataFromCache = flextype('cache')->get($key)) { + if ($dataFromCache = cache()->get($key)) { return $dataFromCache; } $data = $this->converter()->convertToHtml($input); - flextype('cache')->set($key, $data); + cache()->set($key, $data); return $data; } diff --git a/src/flextype/Support/Parsers/Parsers.php b/src/flextype/Support/Parsers/Parsers.php index 66b5f0767..99331df97 100644 --- a/src/flextype/Support/Parsers/Parsers.php +++ b/src/flextype/Support/Parsers/Parsers.php @@ -10,6 +10,8 @@ namespace Flextype\Support\Parsers; use Atomastic\Macroable\Macroable; +use Flextype\Support\Parsers\Markdown; +use Flextype\Support\Parsers\Shortcodes; class Parsers { @@ -24,10 +26,10 @@ public function markdown(): Markdown } /** - * Create a Shortcode instance. + * Create a Shortcodes instance. */ - public function shortcode(): Shortcode + public function shortcodes(): Shortcodes { - return Shortcode::getInstance(); + return Shortcodes::getInstance(); } }