Sha256: 22bab492d67fc889fb2e2f02da3378e0473d7e4d23dfde26aaceb68dc4e6eb25
Contents?: true
Size: 396 Bytes
Versions: 6
Compression:
Stored size: 396 Bytes
Contents
function(doc, req) { //!json templates send(templates.head); var markdown = require("vendor/markdown/showdown"); var resolve_figures = function (text) { return text.replace(/Insert ([^\.]+).png/g, function(all, figure) { return '<img src="../../figures/' + figure + '-tn.png"><br>'; }); }; send(markdown.toHtml(resolve_figures(doc.body))); send(templates.foot); }
Version data entries
6 entries across 6 versions & 1 rubygems