mirror of
https://github.com/typecho/typecho.git
synced 2025-04-07 03:32:30 +02:00
fixed #88
This commit is contained in:
parent
0cc4110b33
commit
29fe597122
var
@ -828,7 +828,7 @@ class Markdown {
|
||||
}
|
||||
else {
|
||||
$text = preg_replace_callback('{
|
||||
(?:(?<=\n)\n|\A\n?) # Must eat the newline
|
||||
(?:(?<=\n)\n?|\A\n?) # Must eat the newline
|
||||
'.$whole_list_re.'
|
||||
}mx',
|
||||
array($this, '_doLists_callback'), $text);
|
||||
|
@ -111,16 +111,12 @@ class Widget_Abstract_Comments extends Widget_Abstract
|
||||
|
||||
$text = $this->pluginHandle(__CLASS__)->trigger($plugged)->content($text, $this);
|
||||
if (!$plugged) {
|
||||
if ($this->options->commentsMarkdown) {
|
||||
$text = MarkdownExtraExtended::defaultTransform($text);
|
||||
$text = Typecho_Common::stripTags($text, '<p><br>' . $this->options->commentsHTMLTagAllowed);
|
||||
} else {
|
||||
$text = Typecho_Common::stripTags($text, $this->options->commentsHTMLTagAllowed);
|
||||
$text = Typecho_Common::cutParagraph($text);
|
||||
}
|
||||
$text = $this->options->commentsMarkdown ? MarkdownExtraExtended::defaultTransform($text)
|
||||
: Typecho_Common::cutParagraph($text);
|
||||
}
|
||||
|
||||
return $this->pluginHandle(__CLASS__)->contentEx($text, $this);
|
||||
$text = $this->pluginHandle(__CLASS__)->contentEx($text, $this);
|
||||
return Typecho_Common::stripTags($text, '<p><br>' . $this->options->commentsHTMLTagAllowed);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -108,11 +108,8 @@ class Widget_Abstract_Contents extends Widget_Abstract
|
||||
|
||||
$content = $this->pluginHandle(__CLASS__)->trigger($plugged)->excerpt($this->text, $this);
|
||||
if (!$plugged) {
|
||||
if ($this->isMarkdown) {
|
||||
$content = MarkdownExtraExtended::defaultTransform($content);
|
||||
} else {
|
||||
$content = Typecho_Common::cutParagraph($content);
|
||||
}
|
||||
$content = $this->isMarkdown ? MarkdownExtraExtended::defaultTransform($content)
|
||||
: Typecho_Common::cutParagraph($content);
|
||||
}
|
||||
|
||||
$contents = explode('<!--more-->', $content);
|
||||
@ -136,11 +133,8 @@ class Widget_Abstract_Contents extends Widget_Abstract
|
||||
$content = $this->pluginHandle(__CLASS__)->trigger($plugged)->content($this->text, $this);
|
||||
|
||||
if (!$plugged) {
|
||||
if ($this->isMarkdown) {
|
||||
$content = MarkdownExtraExtended::defaultTransform($content);
|
||||
} else {
|
||||
$content = Typecho_Common::cutParagraph($content);
|
||||
}
|
||||
$content = $this->isMarkdown ? MarkdownExtraExtended::defaultTransform($content)
|
||||
: Typecho_Common::cutParagraph($content);
|
||||
}
|
||||
|
||||
return $this->pluginHandle(__CLASS__)->contentEx($content, $this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user