mirror of
https://github.com/namibia/tips.git
synced 2024-12-22 10:08:58 +00:00
20 lines
283 B
JavaScript
20 lines
283 B
JavaScript
function escapeStr(str) {
|
|
return str
|
|
.replace(/\"/g, '\\"')
|
|
.replace(/\n/g, '\\n');
|
|
}
|
|
|
|
var render = function(data) {
|
|
var data = data.data;
|
|
|
|
return [
|
|
'## ' + data.title,
|
|
'```sh',
|
|
data.tip,
|
|
'```',
|
|
'\n'
|
|
].join('\n');
|
|
};
|
|
|
|
module.exports = render;
|