mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
created aliases for direct \Parsedown and \ParsedownExtra references
This commit is contained in:
parent
bcbfa0e32a
commit
1ce0176ab6
|
|
@ -84,7 +84,8 @@
|
|||
"Grav\\": "system/src/Grav"
|
||||
},
|
||||
"files": [
|
||||
"system/defines.php"
|
||||
"system/defines.php",
|
||||
"system/aliases.php"
|
||||
]
|
||||
},
|
||||
"archive": {
|
||||
|
|
|
|||
5
system/aliases.php
Normal file
5
system/aliases.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
/** Moved from non-namespaced classes to Grav Framework */
|
||||
class_alias(Grav\Framework\Parsedown\Parsedown::class, '\Parsedown');
|
||||
class_alias(Grav\Framework\Parsedown\ParsedownExtra::class, '\ParsedownExtra');
|
||||
|
|
@ -11,6 +11,7 @@ namespace Grav\Common\GPM\Local;
|
|||
|
||||
use Grav\Common\Data\Data;
|
||||
use Grav\Common\GPM\Common\Package as BasePackage;
|
||||
use Grav\Framework\Parsedown\Parsedown;
|
||||
|
||||
class Package extends BasePackage
|
||||
{
|
||||
|
|
@ -23,7 +24,7 @@ class Package extends BasePackage
|
|||
|
||||
$this->settings = $package->toArray();
|
||||
|
||||
$html_description = \Parsedown::instance()->line($this->__get('description'));
|
||||
$html_description = Parsedown::instance()->line($this->__get('description'));
|
||||
$this->data->set('slug', $package->__get('slug'));
|
||||
$this->data->set('description_html', $html_description);
|
||||
$this->data->set('description_plain', strip_tags($html_description));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user