Permalink
Browse files

Real fix for mini markdown in comments

  • Loading branch information...
1 parent fffbfc1 commit 742c8982d1eefe94f143ef7837f616b57c7f1d59 @snytkine committed Sep 4, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Lampcms/Utf8String.php
@@ -1440,7 +1440,7 @@ public function parseMarkdown(){
public function mmd2Html(){
$parsed = preg_replace('/([*]{2})(.*)([*]{2})/Ui', '<strong>\\2</strong>', $this->string);
- $parsed = preg_replace('/\s+(_)(.*)(_)\s+/Ui', '<em>\\2</em>', $parsed);
+ $parsed = preg_replace('/(^|\s)(_)([^-]+)(_)($|\s)/Ui', '\\1<em>\\3</em>\\5', $parsed);
return $this->handleReturn($parsed);
}

0 comments on commit 742c898

Please sign in to comment.