Permalink
Browse files

fixed bad regex to strip first headline

darcs-hash:20080521204231-23886-a1c9d989c868b577f7b772305986417e0597718d.gz
  • Loading branch information...
Michael Klier
Michael Klier committed May 21, 2008
1 parent e56fd5b commit 5c1ddb4c352d253352bba9333763511bee21c0ed
Showing with 2 additions and 2 deletions.
  1. +2 −2 action.php
View
@@ -23,7 +23,7 @@ function getInfo() {
return array(
'author' => 'Gina Häußge, Michael Klier',
'email' => 'dokuwiki@chimeric.de',
- 'date' => '2008-04-20',
+ 'date' => '2008-05-21',
'name' => 'feedmod',
'desc' => 'Modifies feed items for nicer full html feeds.',
'url' => 'http://wiki.splitbrain.org/plugin:feedmod'
@@ -96,7 +96,7 @@ function _feedmod(&$event, $param) {
$firstheading = $headingIns[1][0];
// strip first heading and replace item title
- $event->data['item']->description = preg_replace('#[^\n]*' . preg_quote(hsc($firstheading), '#') . '.*\n#', '', $event->data['item']->description);
+ $event->data['item']->description = preg_replace('#[^\n]*?>\s*?' . preg_quote(hsc($firstheading), '#') . '\s*?<.*\n#', '', $event->data['item']->description, 1);
$event->data['item']->title = $firstheading;
// check for discussion file

0 comments on commit 5c1ddb4

Please sign in to comment.