We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I was please to see the indent feature, especially since it match my coding style (a 2 space indent ;-)
But, I notice, indentation got reset when nesting template.
Ex. The following JavaScript
var sys = require("sys"); var Jaml = require("jaml").Jaml; /* --------------------------------------------------------------- */ Jaml.register('html', function(data) { html( head( title( 'Jaml rocks' ) ), body( Jaml.render('body-content', data) ) ); }); /* --------------------------------------------------------------- */ Jaml.register('body-content', function(data) { h1( 'Why Jaml rocks' ), ul( Jaml.render('reason', data.reasons) ) }); /* --------------------------------------------------------------- */ Jaml.register('reason', function(reason) { li( reason ); }); /* --------------------------------------------------------------- */ sys.puts(Jaml.render('html', { reasons: [ 'too cool to be true', 'elegant syntax; easy to read, easy to use', 'great combo with node.js' ] }));
Ouput
<html> <head> <title>Jaml rocks</title> </head> <body><h1>Why Jaml rocks</h1> <ul><li>too cool to be true</li> <li>elegant syntax; easy to read, easy to use'</li> <li>great combo with node.js</li> </ul> </body> </html>
Instead of the hope result
<html> <head> <title>Jaml rocks</title> </head> <body> <h1>Why Jaml rocks</h1> <ul> <li>too cool to be true</li> <li>elegant syntax; easy to read, easy to use'</li> <li>great combo with node.js</li> </ul> </body> </html>
Do you have any plan to support proper indention when nesting template ?
Thanks.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I was please to see the indent feature, especially since it match my coding style (a 2 space indent ;-)
But, I notice, indentation got reset when nesting template.
Ex. The following JavaScript
Ouput
Instead of the hope result
Do you have any plan to support proper indention when nesting template ?
Thanks.
The text was updated successfully, but these errors were encountered: