Upgrade to 3.1.4

This commit is contained in:
Bastian Allgeier
2019-05-21 12:16:05 +02:00
parent 066913cb6e
commit 9e18cf635d
42 changed files with 215 additions and 109 deletions

View File

@@ -650,6 +650,11 @@ class App
$text = $this->apply('kirbytext:before', $text);
$text = $this->kirbytags($text, $data);
$text = $this->markdown($text, $inline);
if ($this->option('smartypants', false) !== false) {
$text = $this->smartypants($text);
}
$text = $this->apply('kirbytext:after', $text);
return $text;
@@ -700,7 +705,11 @@ class App
*/
public function languages(): Languages
{
return $this->languages = $this->languages ?? Languages::load();
if ($this->languages !== null) {
return clone $this->languages;
}
return $this->languages = Languages::load();
}
/**
@@ -1122,7 +1131,13 @@ class App
*/
public function smartypants(string $text = null): string
{
return $this->component('smartypants')($this, $text, $this->options['smartypants'] ?? []);
$options = $this->option('smartypants', []);
if ($options === true) {
$options = [];
}
return $this->component('smartypants')($this, $text, $options);
}
/**