Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
markdown-3187009
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
markdown-3187009
Commits
b9225cbc
Commit
b9225cbc
authored
7 years ago
by
Fredrik Jonsson
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2882688
by hgoto: Do not call classes with full path it will result in not found error.
parent
adde97d9
No related branches found
Branches containing commit
Tags
6.x-1.2
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Plugin/Filter/Markdown.php
+2
-5
2 additions, 5 deletions
src/Plugin/Filter/Markdown.php
with
2 additions
and
5 deletions
src/Plugin/Filter/Markdown.php
+
2
−
5
View file @
b9225cbc
...
...
@@ -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
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment