Small Bug In Cmarkdown

[color="#1C2837"][size=“2”]Writing here to confirm, and because I don’t have git account, so I can’t rise new issue myself. If bug is confirmed, please start a new issue for me. Thx![/size][/color]


  • operating system: Windows Seven Home 64-bit
  • Web server: XAMPP 1.8.1
  • browser type: Chrome 21
  • Yii version: 1.1.12


I think I found a small bug in CMarkdown. I’m new to Markdown at all, so I don’t know, if problem belongs to Yii class (wrapper) only or to whole Markdown.

If you put preformatted block (four spaces in the beginning):

 	return shell_exec("echo $input | $markdown_script");

[size="2"]as the last line of Markdown document, CMarkdown will incorrectly format it as:[/size]

<pre>return shell_exec("echo $input | $markdown_script");



[/size][size="2"]thus adding unnecessary space in the end.[/size][size="2"]

If you follow such preformatted block with an empty line or line composed with spaces or tabs, it will be converted to another (second) empty line in pre block.

The only way to workaround this is to add any text after preformatted block.[/size][/size]