Problem/Motivation

slick_ui_help return empty

Comments

thalles created an issue. See original summary.

thalles’s picture

Status: Needs work » Needs review
StatusFileSize
new688 bytes

Follow the patch!

gausarts’s picture

Good catch, thanks! We'd better fix it at Blazy.

gausarts’s picture

Project: Slick Carousel » Blazy
thalles’s picture

On Blazy is diferent!

gausarts’s picture

Status: Needs review » Needs work

Yes, 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 return BlazyMarkdown::parse() should do.

Likely the old approach wasn't removed while the BlazyMarkdown::parse() method was already updated and sufficient.

thalles’s picture

In Blazy it works like this:

+++ b/slick_ui/slick_ui.module
@@ -35,7 +35,7 @@ function slick_ui_help($route_name) {
+    return blazy_parse_markdown($output) ?: '<pre>' . $output . '</pre>';
gausarts’s picture

We 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...

thalles’s picture

I tried return BlazyMarkdown :: parse ($ string); , but Michelf \ MarkdownExtra and League \ CommonMark \ CommonMarkConverter are external libraries, so I have to return a disorganized text.

gausarts’s picture

You 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().

gausarts’s picture

Title: slick_ui_help return empty » hook_help return empty without Markdown class
Status: Needs work » Needs review
StatusFileSize
new1.48 KB

Attached to address the issue.

  • gausarts committed 9dab122 on 8.x-2.x
    Issue #3054051 by thalles, gausarts: hook_help return empty without...
gausarts’s picture

Status: Needs review » Fixed

The 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!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.