Replaced Parsedown with ParsedownExtra to enable Markdown Extra support

This commit is contained in:
Chris Kankiewicz
2020-02-10 09:26:06 -07:00
parent 139d03c14d
commit d61b8a6be4
3 changed files with 56 additions and 9 deletions

View File

@@ -2,7 +2,7 @@
namespace App\ViewFunctions;
use Parsedown;
use ParsedownExtra;
class Markdown extends ViewFunction
{
@@ -18,6 +18,6 @@ class Markdown extends ViewFunction
*/
public function __invoke(string $string)
{
return Parsedown::instance()->parse($string);
return ParsedownExtra::instance()->parse($string);
}
}

View File

@@ -11,7 +11,7 @@
],
"require": {
"php": ">=7.2",
"erusev/parsedown": "^1.7",
"erusev/parsedown-extra": "^0.8.1",
"phlak/config": "^6.1",
"php-di/php-di": "^6.0",
"php-di/slim-bridge": "^3.0",

59
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "275c48fcfa7711e0f1be78d127448fba",
"content-hash": "4f248ea4ebaae06da6485571e6a75512",
"packages": [
{
"name": "erusev/parsedown",
@@ -52,6 +52,53 @@
],
"time": "2019-12-30T22:54:17+00:00"
},
{
"name": "erusev/parsedown-extra",
"version": "0.8.1",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown-extra.git",
"reference": "91ac3ff98f0cea243bdccc688df43810f044dcef"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown-extra/zipball/91ac3ff98f0cea243bdccc688df43810f044dcef",
"reference": "91ac3ff98f0cea243bdccc688df43810f044dcef",
"shasum": ""
},
"require": {
"erusev/parsedown": "^1.7.4"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35"
},
"type": "library",
"autoload": {
"psr-0": {
"ParsedownExtra": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Emanuil Rusev",
"email": "hello@erusev.com",
"homepage": "http://erusev.com"
}
],
"description": "An extension of Parsedown that adds support for Markdown Extra.",
"homepage": "https://github.com/erusev/parsedown-extra",
"keywords": [
"markdown",
"markdown extra",
"parsedown",
"parser"
],
"time": "2019-12-30T23:20:37+00:00"
},
{
"name": "fig/http-message-util",
"version": "1.1.4",
@@ -4870,16 +4917,16 @@
},
{
"name": "vimeo/psalm",
"version": "3.8.4",
"version": "3.8.5",
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
"reference": "c2972dd759aa98561b75a5d68acfc4b634152464"
"reference": "e6ec5fa22a7b9e61670a24d07b3119aff80dcd89"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/c2972dd759aa98561b75a5d68acfc4b634152464",
"reference": "c2972dd759aa98561b75a5d68acfc4b634152464",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/e6ec5fa22a7b9e61670a24d07b3119aff80dcd89",
"reference": "e6ec5fa22a7b9e61670a24d07b3119aff80dcd89",
"shasum": ""
},
"require": {
@@ -4961,7 +5008,7 @@
"inspection",
"php"
],
"time": "2020-02-07T15:56:31+00:00"
"time": "2020-02-07T17:15:50+00:00"
},
{
"name": "webmozart/assert",