mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
On the initial commit of this feature, IPs were just matched with a very simple regex that prioritised simplicity/readability over accuracy. This commit adds a postprocessor for ip matches that makes use of Python's `ipaddress` in the standard library to validate all the IP matches. This way we don't need huge and complex regex patterns to match _and_ validate the IPs, and we can just use `ipaddress` to abstract us from implementing all the validation logic into the regex pattern.
2.2 KiB
2.2 KiB