add parsedown for markdown-usage in a few cases
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -50,7 +50,8 @@
|
|||||||
"robthree/twofactorauth": "^1.6",
|
"robthree/twofactorauth": "^1.6",
|
||||||
"froxlor/idna-convert-legacy": "^2.1",
|
"froxlor/idna-convert-legacy": "^2.1",
|
||||||
"voku/anti-xss": "^4.1",
|
"voku/anti-xss": "^4.1",
|
||||||
"twig/twig": "^3.3"
|
"twig/twig": "^3.3",
|
||||||
|
"erusev/parsedown": "^1.7"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^9",
|
"phpunit/phpunit": "^9",
|
||||||
|
|||||||
52
composer.lock
generated
52
composer.lock
generated
@@ -4,8 +4,58 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "a54c08743cff0b7b272aae81fdab796c",
|
"content-hash": "51513cb9d850aec753c740ee37871430",
|
||||||
"packages": [
|
"packages": [
|
||||||
|
{
|
||||||
|
"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": "froxlor/idna-convert-legacy",
|
"name": "froxlor/idna-convert-legacy",
|
||||||
"version": "v2.1.2",
|
"version": "v2.1.2",
|
||||||
|
|||||||
@@ -21,7 +21,11 @@ class FroxlorTwig extends \Twig\Extension\AbstractExtension
|
|||||||
new \Twig\TwigFilter('idnDecode', array(
|
new \Twig\TwigFilter('idnDecode', array(
|
||||||
$this,
|
$this,
|
||||||
'idnDecodeFilter'
|
'idnDecodeFilter'
|
||||||
))
|
)),
|
||||||
|
new \Twig\TwigFilter('parsedown', [
|
||||||
|
$this,
|
||||||
|
'callParsedown'
|
||||||
|
])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,6 +104,12 @@ class FroxlorTwig extends \Twig\Extension\AbstractExtension
|
|||||||
return \Froxlor\UI\Panel\UI::getLinker()->getLink($linkopts);
|
return \Froxlor\UI\Panel\UI::getLinker()->getLink($linkopts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function callParsedown($string)
|
||||||
|
{
|
||||||
|
$pd = new \Parsedown();
|
||||||
|
return $pd->line($string);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user