Last active
August 29, 2015 14:24
-
-
Save lorenzoongithub/83b6e77ae8b83077e1aa to your computer and use it in GitHub Desktop.
jade-lang.js
This file contains hidden or 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
// | |
// Basic Show n Tell for jade. See: http://jade-lang.com/ | |
// | |
load('https://cdn.jsdelivr.net/jade/1.3.1/jade.min.js'); | |
f = jade.compile('b bold'); | |
s = f(); | |
if (s != '<b>bold</b>') throw ''; | |
f = jade.compile('h2 #{title}'); | |
s = f({title:'my test'}); | |
if (s != '<h2>my test</h2>') throw ''; | |
f = jade.compile('a(href="google.com") Google'); | |
s = f(); | |
if (s != '<a href="google.com">Google</a>') throw '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment