branaway / Japid

A Java-based statically-typed fast template engine that can be used in any Java code. It has special adapter for use with the Play! Framework.
113 stars 18 forks source link

Extra newline at the beginning #52

Open marekk opened 11 years ago

marekk commented 11 years ago

There's an extra newline added at the beginning of compiled template.

@(String name) Hello $name

becomes

p("\n" + "Hello ");// line 1 p(name);// line 2

I suppose this might be the newline after param list declaration, but as there must be newline after this declaration, it should be ignored.

The engine might be used to render other outputs then html, where whitespace is important.

branaway commented 11 years ago

I'll take a look. Thanks!

2013/1/14 marekk notifications@github.com

There's an extra newline added at the beginning of compiled template.

@(String name) Hello $name

becomes

p("\n" + "Hello ");// line 1 p(name);// line 2

I suppose this might be the newline after param list declaration, but as there must be newline after this declaration, it should be ignored.

The engine might be used to render other outputs then html, where whitespace is important.

— Reply to this email directly or view it on GitHubhttps://github.com/branaway/Japid/issues/52.

branaway commented 11 years ago

I see what the issue is.

In the interim, there is an "old" syntax you can use that does not have this problem:

`args String s, int i ...