diff --git a/bin/source-highlight b/bin/source-highlight index 7596ed776ca04d432d05b52867cdfbd99ce62cc2..1373f6626f6ac74b78f6f04f94704a97f7b8694c 100755 --- a/bin/source-highlight +++ b/bin/source-highlight @@ -40,7 +40,7 @@ function ensureMode(name) { ensureMode(modeName); function esc(str) { - return str.replace(/[<&]/, function(ch) { return ch == "&" ? "&" : "<"; }); + return str.replace(/[<&]/g, function(ch) { return ch == "&" ? "&" : "<"; }); } var code = fs.readFileSync("/dev/stdin", "utf8");