blob: 62b5011754641831e1fb163899d42f3453ff2b76 [file] [log] [blame]
// process.js
function processLine(line) {
return line.trim()
.replace(/[<>&"'\u0000-\u001F\u007E-\uFFFF]/g, function(x) {
// escape HTML characters
return '&#' + x.charCodeAt(0) + ';'
})
.replace(/\*(.*?)\*/g, function(x, m) {
// automatically bold text between stars
return '<b>' + m + '</b>';
});
}