forked from malgorithms/toffee
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
toffee now supports postProcessing, say for markup conversion inside …
…your code, etc.
- Loading branch information
1 parent
f756eb7
commit ea03a72
Showing
21 changed files
with
257 additions
and
147 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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,31 +1,11 @@ | ||
{# | ||
x = '"Hello world"' | ||
x = '"Hello world"<script>var x = 100;</script>' | ||
y = '<td>' | ||
z = 'click&clack' | ||
w = [1, 2, {"place": "The Dreadfort"}] | ||
#}<p> | ||
default x = #{x} | ||
default y = #{y} | ||
default z = #{z} | ||
default w = #{w} | ||
</p> | ||
<p> | ||
raw x = #{raw x} | ||
raw y = #{raw y} | ||
raw z = #{raw z} | ||
raw w = #{raw w} | ||
</p> | ||
<script> | ||
x = #{json x} | ||
y = #{json y} | ||
z = #{json z} | ||
w = #{json w} | ||
</script> | ||
<p> | ||
{# | ||
print " raw printed x = #{x}\n" | ||
print " raw printed y = #{y}\n" | ||
print " raw printed z = #{z}\n" | ||
print " raw printed w = #{w}" | ||
#} | ||
custom x = #{x} | ||
custom y = #{y} | ||
custom z = #{z} | ||
custom w = #{w} | ||
</p> |
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,24 +1,6 @@ | ||
<p> | ||
default x = ["Hello world"] | ||
default y = [<td>] | ||
default z = [click&clack] | ||
default w = [1,2,[object Object]] | ||
</p> | ||
<p> | ||
raw x = "Hello world" | ||
raw y = <td> | ||
raw z = click&clack | ||
raw w = 1,2,[object Object] | ||
</p> | ||
<script> | ||
x = "\"Hello world\"" | ||
y = "\u003Ctd\u003E" | ||
z = "click\u0026clack" | ||
w = [1,2,{"place":"The Dreadfort"}] | ||
</script> | ||
<p> | ||
raw printed x = "Hello world" | ||
raw printed y = <td> | ||
raw printed z = click&clack | ||
raw printed w = 1,2,[object Object] | ||
custom x = Helloworldscriptvarx100script | ||
custom y = td | ||
custom z = clickclack | ||
custom w = 12objectObject | ||
</p> |
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,3 @@ | ||
{ | ||
escape: (s) -> "#{s}".replace /[^a-z0-9]/gi, '' | ||
} |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
T3246h354is345-i3245s345-534a534-h534i543d534d534e534n543-m534e543s543s543ag5e534.543 |
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,7 @@ | ||
#{greeting}, world. | ||
#{partial './signature.toffee'} | ||
{# | ||
reverse = (s) -> (c for c in s by -1).join "" | ||
clean = (s) -> (c for c in s when c.match /[a-z\-]/gi).join "" | ||
#} | ||
#{partial './buncha_junk.toffee', {postProcess: (s) -> reverse(clean(s))}} |
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,4 @@ | ||
This-is-a-hidden-message | ||
|
||
.dlrow leurc ,eybdooG | ||
.dlrow ,olleH |
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 @@ | ||
Goodbye, cruel world. |
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,4 @@ | ||
{ | ||
greeting: 'Hello' | ||
postProcess: (s) -> (c for c in s by -1).join '' | ||
} |
Oops, something went wrong.