From efe1b3c914443b6751be3ebc5d24a8bf50759e87 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Mon, 28 Dec 2020 07:59:17 +0100 Subject: [PATCH 1/1] Add markdown twig filter --- composer.json | 5 +- composer.lock | 194 +++++++++++++++++++++++++++++++++++++++++++++++++- symfony.lock | 9 +++ 3 files changed, 206 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 3b1ab4c..a106599 100644 --- a/composer.json +++ b/composer.json @@ -7,6 +7,7 @@ "php": "^7.1.3", "ext-ctype": "*", "ext-iconv": "*", + "erusev/parsedown": "^1.7", "rapsys/airbundle": "dev-master", "rapsys/packbundle": "dev-master", "rapsys/userbundle": "dev-master", @@ -32,7 +33,9 @@ "symfony/var-dumper": "^4.4", "symfony/var-exporter": "^4.4", "symfony/yaml": "^4.4", - "twig/extensions": "^1.5" + "twig/extensions": "^1.5", + "twig/extra-bundle": "^3.1", + "twig/markdown-extra": "^3.1" }, "require-dev": { "doctrine/doctrine-fixtures-bundle": "^3.3", diff --git a/composer.lock b/composer.lock index 6ff1549..fca08a4 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "91f7e228854221d9ee4391104679b610", + "content-hash": "f1f42863c84ecaea54365e39d5e7f595", "packages": [ { "name": "composer/package-versions-deprecated", @@ -1427,6 +1427,56 @@ ], "time": "2020-11-14T15:56:27+00:00" }, + { + "name": "erusev/parsedown", + "version": "1.7.4", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3", + "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, + "type": "library", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "support": { + "issues": "https://github.com/erusev/parsedown/issues", + "source": "https://github.com/erusev/parsedown/tree/1.7.x" + }, + "time": "2019-12-30T22:54:17+00:00" + }, { "name": "jdorn/sql-formatter", "version": "v1.2.17", @@ -6033,6 +6083,78 @@ "abandoned": true, "time": "2018-12-05T18:34:18+00:00" }, + { + "name": "twig/extra-bundle", + "version": "v3.1.1", + "source": { + "type": "git", + "url": "https://github.com/twigphp/twig-extra-bundle.git", + "reference": "a7c5799cf742ab0827f5d32df37528ee8bf5a233" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/twig-extra-bundle/zipball/a7c5799cf742ab0827f5d32df37528ee8bf5a233", + "reference": "a7c5799cf742ab0827f5d32df37528ee8bf5a233", + "shasum": "" + }, + "require": { + "php": "^7.1.3|^8.0", + "symfony/framework-bundle": "^4.3|^5.0", + "symfony/twig-bundle": "^4.3|^5.0", + "twig/twig": "^2.4|^3.0" + }, + "require-dev": { + "twig/cssinliner-extra": "^2.12|^3.0", + "twig/html-extra": "^2.12|^3.0", + "twig/inky-extra": "^2.12|^3.0", + "twig/intl-extra": "^2.12|^3.0", + "twig/markdown-extra": "^2.12|^3.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Twig\\Extra\\TwigExtraBundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + } + ], + "description": "A Symfony bundle for extra Twig extensions", + "homepage": "https://twig.symfony.com", + "keywords": [ + "bundle", + "extra", + "twig" + ], + "support": { + "source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.1.1" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2020-05-21T09:56:39+00:00" + }, { "name": "twig/html-extra", "version": "v2.14.1", @@ -6099,6 +6221,76 @@ ], "time": "2020-05-21T09:54:27+00:00" }, + { + "name": "twig/markdown-extra", + "version": "v3.1.1", + "source": { + "type": "git", + "url": "https://github.com/twigphp/markdown-extra.git", + "reference": "1fe798d559665b64bda4b08eda10793427d7e3bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/markdown-extra/zipball/1fe798d559665b64bda4b08eda10793427d7e3bc", + "reference": "1fe798d559665b64bda4b08eda10793427d7e3bc", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "twig/twig": "^2.4|^3.0" + }, + "require-dev": { + "erusev/parsedown": "^1.7", + "league/commonmark": "^1.0", + "league/html-to-markdown": "^4.8", + "michelf/php-markdown": "^1.8", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Twig\\Extra\\Markdown\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + } + ], + "description": "A Twig extension for Markdown", + "homepage": "https://twig.symfony.com", + "keywords": [ + "html", + "markdown", + "twig" + ], + "support": { + "source": "https://github.com/twigphp/markdown-extra/tree/v3.1.1" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2020-08-05T14:54:08+00:00" + }, { "name": "twig/twig", "version": "v2.14.1", diff --git a/symfony.lock b/symfony.lock index 52e1f04..6c15b2a 100644 --- a/symfony.lock +++ b/symfony.lock @@ -60,6 +60,9 @@ "egulias/email-validator": { "version": "2.1.17" }, + "erusev/parsedown": { + "version": "1.7.4" + }, "jdorn/sql-formatter": { "version": "1.2.17" }, @@ -314,9 +317,15 @@ "config/packages/twig_extensions.yaml" ] }, + "twig/extra-bundle": { + "version": "3.1.1" + }, "twig/html-extra": { "version": "2.12.5" }, + "twig/markdown-extra": { + "version": "3.1.1" + }, "twig/twig": { "version": "2.12.5" } -- 2.41.1