-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1a581f
commit 202f03b
Showing
12 changed files
with
66 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
return (function (template, ctx) { | ||
let out = ""; | ||
ctx.$lineNumber = 1; | ||
ctx.$filename = "{{__dirname}}index.edge"; | ||
let $lineNumber = 1; | ||
let $filename = "{{__dirname}}index.edge"; | ||
try { | ||
out += `${template.renderInline(`include-conditionals/${ctx.resolve('username') === "virk" ? "virk.edge" : "guest.edge"}`)(template, ctx)}`; | ||
out += `${template.renderInline(`include-conditionals/${state.username === "virk" ? "virk.edge" : "guest.edge"}`)(template,state,ctx)}`; | ||
} catch (error) { | ||
ctx.reThrow(error); | ||
ctx.reThrow(error, $filename, $lineNumber); | ||
} | ||
return out; | ||
})(template, ctx) | ||
return out; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
return (function (template, ctx) { | ||
let out = ""; | ||
ctx.$lineNumber = 1; | ||
ctx.$filename = "{{__dirname}}index.edge"; | ||
let $lineNumber = 1; | ||
let $filename = "{{__dirname}}index.edge"; | ||
try { | ||
out += `${template.renderInline(ctx.resolve('partial'))(template, ctx)}`; | ||
out += `${template.renderInline(state.partial)(template,state,ctx)}`; | ||
} catch (error) { | ||
ctx.reThrow(error); | ||
ctx.reThrow(error, $filename, $lineNumber); | ||
} | ||
return out; | ||
})(template, ctx) | ||
return out; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
return (function (template, ctx) { | ||
let out = ""; | ||
ctx.$lineNumber = 1; | ||
ctx.$filename = "{{__dirname}}index.edge"; | ||
let $lineNumber = 1; | ||
let $filename = "{{__dirname}}index.edge"; | ||
try { | ||
out += `${template.renderInline("include-literal/partial")(template, ctx)}`; | ||
out += `${template.renderInline("include-literal/partial")(template,state,ctx)}`; | ||
} catch (error) { | ||
ctx.reThrow(error); | ||
ctx.reThrow(error, $filename, $lineNumber); | ||
} | ||
return out; | ||
})(template, ctx) | ||
return out; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
let out = ""; | ||
let $lineNumber = 1; | ||
let $filename = "{{__dirname}}index.edge"; | ||
try { | ||
let username = 'virk'; | ||
$lineNumber = 2; | ||
out += `${template.renderInline("include-nested-shared-locals/partial","username")(template,state,ctx,username)}`; | ||
} catch (error) { | ||
ctx.reThrow(error, $filename, $lineNumber); | ||
} | ||
return out; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@set('username', 'virk') | ||
@include("include-nested-shared-locals/partial") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello virk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello {{ username }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@include("include-nested-shared-locals/partial-1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
return (function (template, ctx) { | ||
let out = ""; | ||
ctx.$lineNumber = 1; | ||
ctx.$filename = "{{__dirname}}index.edge"; | ||
let $lineNumber = 1; | ||
let $filename = "{{__dirname}}index.edge"; | ||
try { | ||
out += `${template.renderInline("include-nested/partial")(template, ctx)}`; | ||
out += `${template.renderInline("include-nested/partial")(template,state,ctx)}`; | ||
} catch (error) { | ||
ctx.reThrow(error); | ||
ctx.reThrow(error, $filename, $lineNumber); | ||
} | ||
return out; | ||
})(template, ctx) | ||
return out; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
return (function (template, ctx) { | ||
let out = ""; | ||
ctx.$lineNumber = 1; | ||
ctx.$filename = "{{__dirname}}index.edge"; | ||
let $lineNumber = 1; | ||
let $filename = "{{__dirname}}index.edge"; | ||
try { | ||
out += `${template.renderInline("include-shared-ctx/partial")(template, ctx)}`; | ||
out += `${template.renderInline("include-shared-ctx/partial")(template,state,ctx)}`; | ||
} catch (error) { | ||
ctx.reThrow(error); | ||
ctx.reThrow(error, $filename, $lineNumber); | ||
} | ||
return out; | ||
})(template, ctx) | ||
return out; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters