lib.normalize-ip6-addr: no :: for single section

This commit is contained in:
tv 2018-12-12 00:34:32 +01:00
parent 474e3e2e45
commit 35be9c66bf

View File

@ -93,7 +93,13 @@ let
in
if max.pos == 0
then a
else "${concatStringsSep ":" lhs}::${concatStringsSep ":" rhs}";
else let
sep =
if 8 - (length lhs + length rhs) == 1
then ":0:"
else "::";
in
"${concatStringsSep ":" lhs}${sep}${concatStringsSep ":" rhs}";
drop-leading-zeros =
let