Kirby 2.5.8 update breaks markdown/smartypants?!

I updated from 2.5.7 to 2.5.8 and now I get a smartypants parse error:

It has to do with this commit/update; if I reverse these changes everything works again.

How can I fix this?

For what it’s worth, I have the following in my config:

c::set('markdown.extra', true);
c::set('markdown.breaks', false);

c::set('smartypants', true);
c::set('smartypants.attr', 2);
c::set('smartypants.doublequote.open', '“');
c::set('smartypants.doublequote.close', '”');
c::get('smartypants.space.emdash', ' ');
c::get('smartypants.space.endash', ' ');
c::get('smartypants.space.colon', ' ');
c::get('smartypants.space.semicolon', ' ');
c::get('smartypants.space.marks', ' ');
c::get('smartypants.space.frenchquote', ' ');
c::get('smartypants.space.thousand', ' ');
c::get('smartypants.space.unit', ' ');
c::get('smartypants.skip', 'pre|code|kbd|script|style|math');

Any ideas? Thanks.

Do you run your own SmartyPants extension?

You can fix this by replacing line 67 in kirby/kirby/component/smartypants.php with:

public function parse($text, $force = false, Field $field = null) {

Will be fixed in the next release. I’m sorry :confused:

1 Like

Thanks Bastian for the super quick reply :wink:

Yes, this fixes it!

No, I am not running any Smartypants extension, but I have a ‘widont’ tag:

kirbytext::$tags['widont'] = array(
    'html' => function($tag) {
        $text = $tag->attr('widont');
        return widont($text);
    }
);

That I chain with Smartypants:

echo $page->title()->smartypants()->widont();

And I have a comparable ‘titlecase’ tag… for what it’s worth.