Update hosts.js

This commit is contained in:
Namhyeon Go 2020-07-29 15:39:42 +09:00
parent 9d1e7d202e
commit 1ef81ad19a

View File

@ -12,9 +12,9 @@ exports.getHosts = function() {
var fileContent = FILE.readFile(filePath, "utf-8");
var lines = fileContent.split(/[\r\n]+/g).filter(function(s) {
return !(s.indexOf('#') == 0)
return !(s.indexOf(' #') == 0)
}).map(function(s) {
var pos = s.indexOf('#');
var pos = s.indexOf(' #');
if(pos > -1) {
return s.substring(pos).replace(/\s\s/g, ' ');
} else {