Code cleanup.

This commit is contained in:
James Cole
2017-11-22 21:12:27 +01:00
parent 4e6b782204
commit 781ca052d8
142 changed files with 213 additions and 859 deletions

View File

@@ -148,21 +148,6 @@ class General extends Twig_Extension
);
}
/**
* @return Twig_SimpleFilter
*/
protected function markdown(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
'markdown',
function (string $text): string {
$converter = new CommonMarkConverter;
return $converter->convertToHtml($text);
},['is_safe' => ['html']]
);
}
/**
* @return Twig_SimpleFilter
*/
@@ -181,7 +166,6 @@ class General extends Twig_Extension
);
}
/**
* @return Twig_SimpleFunction
*/
@@ -244,6 +228,21 @@ class General extends Twig_Extension
);
}
/**
* @return Twig_SimpleFilter
*/
protected function markdown(): Twig_SimpleFilter
{
return new Twig_SimpleFilter(
'markdown',
function (string $text): string {
$converter = new CommonMarkConverter;
return $converter->convertToHtml($text);
}, ['is_safe' => ['html']]
);
}
/**
* @return Twig_SimpleFilter
*/