dokufreaks / plugin-comment

http://dokuwiki.org/plugin:comment
GNU General Public License v2.0
9 stars 3 forks source link

Paragraph breaks are not honored correctly #7

Open phallobst opened 11 years ago

phallobst commented 11 years ago

With the new DokuWiki "Adora Belle" (RC1) and the latest plugin release (2009-02-06) I have the following surprising behavior:

Line 1

/* Comment A */
Line 2

/*
 * Comment B
 */
Line 3

renders as

Line 1 Line 2 Line 3

whereas

Line 1
/* Comment A */

Line 2
/*
 * Comment B
 */

Line 3

yields

Line 1

Line 2

Line 3

The empty lines should always be preserved, resulting in a paragraph break for all cases.

phallobst commented 11 years ago

After I replaced the original connectTo function in syntax.php with the following

function connectTo($mode) {
  $this->Lexer->addEntryPattern('/\*',$mode,'plugin_comment');
}
function postConnect() {
  $this->Lexer->addExitPattern('\*/','plugin_comment');
}

everything rendered as expected. I must admit that I have no idea if that causes other problems...