hectorguo / CKEditor-Markdown-Plugin

Markdown Plugin for CKEditor
http://hectorguo.github.io/CKEditor-Markdown-Plugin/
112 stars 24 forks source link

Code blocks placed on single line without language #11

Open TomGillen opened 8 years ago

TomGillen commented 8 years ago

If I use either CodeSnippets or manually write the markdown for a multi-line code block (fenced or indented), when viewing the text as markdown, the plugin removes all line breaks and forgets which language was being used.

e.g.

```c#
bool Foo()
{
    return false;
}

becomes:
bool Foo(){    return false;}


This in turn removes all syntax highlighting and formatting when switching back to WYSIWYG.
tablatronix commented 8 years ago

I have the some problem with pre elements all newlines are removed...

tablatronix commented 8 years ago

also fails to load code block languages in

<code class="language-php">

is lost, but if iI do a ```php it puts it back in, so the html read in is not parsing it.