also parse markdown in excerpts

This commit is contained in:
Stijn-Flipper 2014-01-12 15:36:40 +01:00
parent 4d70353b08
commit 91bb998b84
2 changed files with 4 additions and 3 deletions

View file

@ -30,8 +30,9 @@ class MarkdownExtraExtended_Parser extends MarkdownExtra_Parser {
function doHardBreaks($text) {
# Do hard breaks:
# EXTENDED: changed to allow breaks without two spaces and just one new line
# original code /* return preg_replace_callback('/ {2,}\n/', */
return preg_replace_callback('/ *\n/',
# to activate this, uncomment the following code:
# return preg_replace_callback('/ *\n/',
return preg_replace_callback('/ {2,}\n/',
array(&$this, '_doHardBreaks_callback'), $text);
}

View file

@ -246,7 +246,7 @@ class Pico {
'date' => isset($page_meta['date']) ? $page_meta['date'] : '',
'date_formatted' => isset($page_meta['date']) ? date($config['date_format'], strtotime($page_meta['date'])) : '',
'content' => $page_content,
'excerpt' => $this->limit_words(strip_tags($page_content), $excerpt_length)
'excerpt' => $this->limit_words($page_content, $excerpt_length)
);
// Extend the data provided with each page by hooking into the data array