nunjucks-highlight.js
Version:
A custom nunjucks tag to highlight code blocks using highlight.js
42 lines (34 loc) • 687 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Nunjucks Test</title>
<link rel="stylesheet" href="github.css" />
</head>
<body>
{% code %}
//saved from: http://www.joelonsoftware.com/items/2006/08/01.html
function map(fn, a) {
for (i = 0; i < a.length; i++) {
a[i] = fn(a[i]);
}
}
function reduce(fn, a, init) {
var s = init;
for (i = 0; i < a.length; i++) {
s = fn( s, a[i] );
}
return s;
}
{% endcode %}
{% code %}
<a href="http://www.spitcode.com" />
{% endcode %}
{% code %}
.area {
display: -ms-grid; /* prefix for IE 10 */
display: grid; /* or inline-grid */
}
{% endcode %}
</body>
</html>