- 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");
as the last line of Markdown document, CMarkdown will incorrectly format it as:
<pre>return shell_exec("echo $input | $markdown_script"); <pre>
thus adding unnecessary space in the end.
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]