-
Notifications
You must be signed in to change notification settings - Fork 478
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
Dust.js has started outputting 'line,2 line,4 line,13 line,6' in weird places #556
Comments
Thanks for the report. Can you provide a template that shows the issue? |
Hi, seems to be for blocks containing only linebreaks. Not that you should have these all over the place, but many of my boilerplate logic seems to have them anyway.
outputs
EDIT: i seem to be able to get the same error for all empty {<NAME}{/NAME} blocks on my live apps when compiling dust templates. could reproduce it using the simple example above though. |
Thanks, I know the commit to look at. Looks like this is an edge case that has never been tested. That should be enough info for the problem to be fixed. Thanks again for the report. |
Repro:
|
Target commit 374bbdb |
Incidentally the |
Nah I wasnt, my Node applications compile all templates on start up. But On 10 March 2015 at 19:12, Seth Kinast notifications@github.com wrote:
|
…als. When whitespace compression is on, format blocks are optimized away. When whitespace compression is off, format blocks are usually coerced into buffers. But if there are no buffers (which is basically only possible within an inline partial, since you're not going to compile a template that's a bunch of newlines and nothing else), we visit `compiler.nodes.format`, which didn't get updated as part of linkedin#531 since it's such an edge case. Closes linkedin#556
…als. When whitespace compression is on, format blocks are optimized away. When whitespace compression is off, format blocks are usually coerced into buffers. But if there are no buffers (which is basically only possible within an inline partial, since you're not going to compile a template that's a bunch of newlines and nothing else), we visit `compiler.nodes.format`, which didn't get updated as part of linkedin#531 since it's such an edge case. Closes linkedin#556
We have released 2.6.1 with a fix. Thanks for taking the time to report! |
Cheers! On 12 March 2015 at 01:38, Seth Kinast notifications@github.com wrote:
|
Come DustJS 2.6.0 it has started outputting line,[number] in random places. It seems to be affected by the
dust.config.whitespace
setting. Weirdly enough I got the unwanted output whendust.config.whitespace = false
on a DO droplet (Node v0.10.33), while I got it whendust.config.whitespace = true
on my workstation. Downgrading to v2.5.1 resolved the problem.I precompile all my templates.
I am pressed for time the coming weeks, but if nobody else is experiencing this I could dig some more to find out exactly where the error occurs.
The text was updated successfully, but these errors were encountered: