Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra newline at the beginning #52

Open
marekk opened this issue Jan 14, 2013 · 2 comments
Open

Extra newline at the beginning #52

marekk opened this issue Jan 14, 2013 · 2 comments

Comments

@marekk
Copy link

marekk commented Jan 14, 2013

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
Copy link
Owner

I'll take a look. Thanks!

2013/1/14 marekk [email protected]

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//issues/52.

@branaway
Copy link
Owner

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
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants