Skip to content

Commit

Permalink
Fixed code formatting according to JSCS settings
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingDR committed Nov 18, 2019
1 parent 06151ca commit 99e3da3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions lib/renderer.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
'use strict';

var Twig = require('twig'),
twig = Twig.twig;
var Twig = require('twig');
var twig = Twig.twig;
Twig.cache(false);

// pretty the json output, convenient for debugging
Twig.extendFilter("json", function(value){
return JSON.stringify(value || "", null, 2);
Twig.extendFilter('json', function(value) {
return JSON.stringify(value || '', null, 2);
});

function twigCompile(data) {
return twig({
return twig({
data: data.text,
path: data.path
});
Expand All @@ -21,9 +21,9 @@ function twigRenderer(data, locals) {
}

twigRenderer.compile = function(data) {
return function(locals) {
return twigCompile(data).render(locals);
}
return function(locals) {
return twigCompile(data).render(locals);
};
};

module.exports = twigRenderer;
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Twig renderer', function() {
}).should.eql('Hello world!');
});

it('compile', function() {
it('compile', function() {
var body = [
'Hello {{ name }}!'
].join('\n');
Expand Down

0 comments on commit 99e3da3

Please sign in to comment.