mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-11 20:21:03 +00:00
Update hosts.js
This commit is contained in:
parent
9d1e7d202e
commit
1ef81ad19a
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user