diff --git a/system/typemill/Extensions/ParsedownExtension.php b/system/typemill/Extensions/ParsedownExtension.php index 16509d9..105eed4 100644 --- a/system/typemill/Extensions/ParsedownExtension.php +++ b/system/typemill/Extensions/ParsedownExtension.php @@ -758,7 +758,7 @@ class ParsedownExtension extends \ParsedownExtra protected function blockShortcode($Line) { - if ($this->dispatcher && preg_match('/^\[:.*:\]/', $Line['text'], $matches)) + if ($this->dispatcher && preg_match('/^\[:.*?:\]/', $Line['text'], $matches)) { if(is_array($this->allowedShortcodes) && empty($this->allowedShortcodes)) { @@ -790,19 +790,29 @@ class ParsedownExtension extends \ParsedownExtra { $html = '
No shortcode found.
'; } + + // Handle the inline content after the block shortcode. + $inlineContent = trim(substr($Line['text'], strlen($matches[0]))); + $inlineElements = ''; + if($inlineContent && $inlineContent != '') + { + # make sure inline-text with more shortcodes are properly parsed after an opening block-element + $inlineElements = $this->line($inlineContent); + } - return array( - 'element' => array( - 'rawHtml' => $html, + $Block = [ + 'element' => [ + 'rawHtml' => $html . $inlineElements, 'allowRawHtmlInSafeMode' => true, - ), + ], 'extent' => strlen($matches[0]), - ); - } - else - { - return; + 'complete' => true, // Close the block at the end of the line. + ]; + + return $Block; } + + return; } protected function inlineShortcode($Excerpt) @@ -856,6 +866,7 @@ class ParsedownExtension extends \ParsedownExtra } } + protected $allowedShortcodes = false; public function setAllowedShortcodes(array $shortcodelist) diff --git a/system/typemill/author/js/vue-user.js b/system/typemill/author/js/vue-user.js index bb3a206..6113a84 100644 --- a/system/typemill/author/js/vue-user.js +++ b/system/typemill/author/js/vue-user.js @@ -115,7 +115,10 @@ const app = Vue.createApp({ self.showModal = false; self.messageClass = 'bg-teal-500'; self.message = response.data.message; - + if(response.data.logout !== undefined) + { + window.location.replace(data.urlinfo.baseurl + '/tm/logout'); + } window.location.replace(data.urlinfo.baseurl + '/tm/users'); }) .catch(function (error)