Introduction of the support of RAW lines.
authorfunilrys <redacted>
Wed, 31 Mar 2021 12:51:54 +0000 (14:51 +0200)
committerfunilrys <redacted>
Wed, 31 Mar 2021 12:53:22 +0000 (14:53 +0200)
commit7971a0cbc91adb86b771561ddf19a03cb687a7dc
tree75df0dbca5112cd7a4827eb729bf3059775c2389
parent261acf1dfab01a9a54223846f2c2ec4bdd5437a0
Introduction of the support of RAW lines.

This patch fixes https://github.com/StevenBlack/hosts/issues/1563#issuecomment-810688754

Indeed, before this patch, the updater was not supporting a RAW (not
hosts) list of domains as input.

Changes:

    matches_exclusions():
        (new) Support for rule formatted as 'example.com' along with
              the pre-existing '0.0.0.0 example.com'.

    normalize_rule():
        (edit) Apply DRY.

        (new) Support the normalization of the rule formatted as
              'example.com' along with the pre-existing '0.0.0.0
              example.com'.

    strip_rule():
        (new) Complete rewrite in order to strip all possible lines.
testUpdateHostsFile.py
updateHostsFile.py
git clone https://git.99rst.org/PROJECT