mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Fix: hosts parsing
This commit is contained in:
@@ -3,7 +3,12 @@ export const processLine = (line: string): string | null => {
|
||||
return null;
|
||||
}
|
||||
|
||||
const line_0: string = line[0];
|
||||
const trimmed: string = line.trim();
|
||||
if (trimmed === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
const line_0: string = trimmed[0];
|
||||
|
||||
if (
|
||||
line_0 === '#'
|
||||
@@ -15,11 +20,6 @@ export const processLine = (line: string): string | null => {
|
||||
return null;
|
||||
}
|
||||
|
||||
const trimmed: string = line.trim();
|
||||
if (trimmed === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return trimmed;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user