1
0
Fork 0
mirror of https://github.com/Luzifer/named-blacklist.git synced 2024-11-08 15:30:06 +00:00

Add case: Line ends with hash and has no comment

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-08-25 21:18:43 +02:00
parent 4795a47c60
commit 2a224984a5
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -27,7 +27,7 @@ func (p providerHostFile) GetDomainList(d providerDefinition) ([]entry, error) {
var (
entries []entry
matcher = regexp.MustCompile(`^(?:[0-9.]+|[a-z0-9:]+)\s+([^\s]+)(?:\s+#(.+))?$`)
matcher = regexp.MustCompile(`^(?:[0-9.]+|[a-z0-9:]+)\s+([^\s]+)(?:\s+#(.+)|\s+#)?$`)
)
scanner := bufio.NewScanner(r)