bwiggs / nvalt-prime

An nvALT Preview Theme on Steroids
143 stars 15 forks source link

New lines? #9

Open peteruithoven opened 9 years ago

peteruithoven commented 9 years ago

I noticed that newlines are ignored, isn't one aspect of github flavored markdown that they are not ignores? See: https://help.github.com/articles/writing-on-github/

cjmatta commented 9 years ago

Bump on this. Code that's between two triple back ticks should respect newlines. I would have provided a patch, but all your JS code is minified, is that necessary for a desktop app? It would be nice to be able to read/modify the code.

I see that this is actually more about how nvAlt treats triple back ticks than about how you treat them. I noticed that if the code is indented it's highlighted correctly and the newlines are preserved.

bwiggs commented 9 years ago

@cjmatta only dependency libs are minified, right now everything else is in either plugins or index.html as inline js.

I'll take a look at the new line issues and see if there's anything we can do.

bwiggs commented 9 years ago

@cjmatta thanks for posting ttscoff/nv#319 upstream.

aledoroshenko commented 9 years ago

Just to bump this. Thats what i have in my rendered html:

<p>```
provide.factory(&#8216;b&#8217;, function(a) {
 return a*2;
});</p>

<p>function Controller(b) {
 expect(a).toEqual(246);
}
```</p>

<p>So factory is a function which is responsible for creating the value. Notice that the factory function can ask for other dependencies. But what if you want to be more OO and have a class called Greeter</p>

<p><code>
function Greeter(a) {
  this.greet = function() {
    return 'Hello ' + a;
  }
}
</code></p>

So it's more like a markdown lib bug in nvAlt? (i see Multimarkdown now supports fenced blocks, but didn't figure out how to update it in nvalt package).