Skip to content

Instantly share code, notes, and snippets.

@mcfog
Created December 24, 2011 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcfog/1517367 to your computer and use it in GitHub Desktop.
Save mcfog/1517367 to your computer and use it in GitHub Desktop.
coco filter for Jade
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