Created
July 14, 2014 09:55
-
-
Save avaly/ed940eb3e13a1c4ac26f to your computer and use it in GitHub Desktop.
Jade Markdown filter with local variable
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
<html> | |
<body> | |
<div class="raw">Test `code` in _some_ awesome **markdown**</div> | |
<div class="md-local">Test `code` in _some_ awesome **markdown** | |
</div> | |
<div class="md-inline"><p>Test <code>code</code> in <em>some</em> awesome <strong>markdown</strong></p> | |
</div> | |
</body> | |
</html> |
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
<html> | |
<body> | |
<div class="raw">Test `code` in _some_ awesome **markdown**</div> | |
<div class="md-local"><p>Test <code>code</code> in <em>some</em> awesome <strong>markdown</strong></p> | |
</div> | |
<div class="md-inline"><p>Test <code>code</code> in <em>some</em> awesome <strong>markdown</strong></p> | |
</div> | |
</body> | |
</html> |
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
html | |
body | |
.raw= foo | |
.md-local | |
:markdown= foo | |
.md-inline | |
:markdown | |
Test `code` in _some_ awesome **markdown** |
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
var fs = require('fs'), | |
jade = require('./index'); | |
var src = fs.readFileSync('./test-case.jade', 'utf8'); | |
var compiled = jade.compile(src, { | |
filename: 'test-case.jade', | |
pretty: true | |
}); | |
console.log(compiled({ | |
foo: 'Test `code` in _some_ awesome **markdown**' | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment