Skip to content
Snippets Groups Projects
Commit b9225cbc authored by Fredrik Jonsson's avatar Fredrik Jonsson
Browse files

Issue #2882688 by hgoto: Do not call classes with full path it will result in not found error.

parent adde97d9
No related branches found
Tags 6.x-1.2
No related merge requests found
......@@ -84,17 +84,14 @@ class Markdown extends FilterBase {
if (!empty($text)) {
switch ($this->settings['markdown_library']) {
case 'commonmark':
$converter = new League\CommonMark\CommonMarkConverter();
$converter = new CommonMarkConverter();
$text = $converter->convertToHtml($text);
break;
case 'php-markdown':
if (!class_exists('Michelf\MarkdownExtra') && \Drupal::moduleHandler()->moduleExists('libraries')) {
libraries_load('php-markdown', 'markdown-extra');
$text = MarkdownExtra::defaultTransform($text);
}
else {
$text = Michelf\MarkdownExtra::defaultTransform($text);
}
$text = MarkdownExtra::defaultTransform($text);
break;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment