One of my cats, presumably Pangur Bàn, has been sitting on my iPad, so I think, because an iOS Shortcuts program has been deleted. Twice, and it’s the same program. Luckily it’s a short subroutine and I can type most of it in from memory, the remainder requiring a little fiddling and testing. What have they got against this particular subroutine? Could be that it is listed first in a list of programs in a ‘folder’ maybe.
The routine gets the address of the Firebrick and if it is a literal IPv6 address it then encloses it in [ ] because the return value is intended to be suitable for immediate inclusion in a URL. The return value can be either an IPv4 literal, an [IPv6 literal], or a domain name (FQDN). Anything objectionable in that to felines?