Created
December 24, 2011 13:48
-
-
Save mcfog/1517367 to your computer and use it in GitHub Desktop.
coco filter for Jade
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
require(\jade)filters.coco = (str)-> | |
str = str.replace /\\n/g, '\n' | |
js = require(\coco)compile(str)replace(/\n/g, '\\n') | |
"<script type='text/javascript'>#js</script>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment