Closed (fixed)
Project:
Blazy
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 May 2019 at 19:31 UTC
Updated:
6 Sep 2019 at 09:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
thallesFollow the patch!
Comment #3
gausarts commentedGood catch, thanks! We'd better fix it at Blazy.
Comment #4
gausarts commentedComment #5
thallesOn Blazy is diferent!
Comment #6
gausarts commentedYes, you are right. We need to do it once for all.
The reason is the
blazy_parse_markdown()function has no need to double check, simple returnBlazyMarkdown::parse()should do.Likely the old approach wasn't removed while the
BlazyMarkdown::parse()method was already updated and sufficient.Comment #7
thallesIn Blazy it works like this:
Comment #8
gausarts commentedWe can fix Blazy as this is now a redundant check:
https://git.drupalcode.org/project/blazy/blob/8.x-2.x/blazy.module#L178
return BlazyMarkdown::isApplicable() ? BlazyMarkdown::parse($string) : FALSE;Perhaps, we can just:
return BlazyMarkdown::parse($string);As per:
https://git.drupalcode.org/project/blazy/blob/8.x-2.x/src/Utility/BlazyM...
Comment #9
thallesI tried
return BlazyMarkdown :: parse ($ string);, but Michelf \ MarkdownExtra and League \ CommonMark \ CommonMarkConverter are external libraries, so I have to return a disorganized text.Comment #10
gausarts commentedYou are right. We may need to use
<pre>tags for this return line:https://git.drupalcode.org/project/blazy/blob/8.x-2.x/src/Utility/BlazyM...
Like we did as the fallback at the
hook_help().Comment #11
gausarts commentedAttached to address the issue.
Comment #13
gausarts commentedThe test appears to be broken since the latest 8.7, was fine before then. We can skip it for now.
Committed. Thank you for contribution!