1 | var Path = require("path");
|
2 |
|
3 | function h(code, lang) {
|
4 | code = code.trim();
|
5 | code = code.replace('&', '&');
|
6 | code = code.replace('<', '<');
|
7 | code = code.replace('>', '>');
|
8 | return "<pre class='highlight " + lang + "'>" + code + "</pre>";
|
9 | }
|
10 |
|
11 | h.cssFile = Path.join(__dirname, "highlight.css");
|
12 |
|
13 | module.exports = h;
|