]> git.proxmox.com Git - ceph.git/blob - ceph/src/civetweb/src/third_party/duktape-1.8.0/examples/guide/process.js
buildsys: switch source download to quincy
[ceph.git] / ceph / src / civetweb / src / third_party / duktape-1.8.0 / examples / guide / process.js
1 // process.js
2 function processLine(line) {
3 return line.trim()
4 .replace(/[<>&"'\u0000-\u001F\u007E-\uFFFF]/g, function(x) {
5 // escape HTML characters
6 return '&#' + x.charCodeAt(0) + ';'
7 })
8 .replace(/\*(.*?)\*/g, function(x, m) {
9 // automatically bold text between stars
10 return '<b>' + m + '</b>';
11 });
12 }