also parse markdown in excerpts
This commit is contained in:
parent
4d70353b08
commit
91bb998b84
2 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue