Fenced codeblocks with extra spaces at the end don't work?

Why doesn’t this code:

var www_server = Sealious.ChipManager.get_chip("channel", "www_server");

www_server.route({
    method: "GET",
    path: "/users.csv",
    handler: function(context, request){
      // .. logic goes here

preserve newlines? Did the syntax change or is there something I am missing?

إعجاب واحد (1)

You should encapsulate the code block with ``` instead of `.

var www_server = Sealious.ChipManager.get_chip("channel", "www_server");

www_server.route({
    method: "GET",
    path: "/users.csv",
    handler: function(context, request){
      // .. logic goes here
إعجابَين (2)

Please take a look at the source of my message: I am using ```…

It seems to be the extra space after the closing ```

3 إعجابات

I see, removing the redundant space does fix the issue.

But It’s not CommonMark compliant, right? When I pasted the code [here] it behaved as it should.

إعجاب واحد (1)

Discourse isn’t using CommonMark yet (to my knowledge) so if it works at commonmark.js demo, when Discourse switches to CommonMark, it should resolve itself.

إعجابَين (2)

Yes I can confirm we’re note on CommonMark yet. In 1.6 I did a lot of work to convert our existing markdown to ES6 so that we could try plugging in a different engine and see how well it works.

5 إعجابات

Rebaked OP and all seems fine

trailing spaces 
no 
longer 
break this
3 إعجابات