8000 `parseTLD` fails on fully-qualified domain names ending in periods · Issue #3 · jprider63/tld · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
parseTLD fails on fully-qualified domain names ending in periods #3
Open
@gwern

Description

@gwern

https://en.wikipedia.org/wiki/Fully_qualified_domain_name

> parseTLD "https://pyropus.ca./software/getmail/"
Nothing
it ::
  Maybe
    (Data.Text.Internal.Text, Data.Text.Internal.Text,
     Data.Text.Internal.Text)
(0.06 secs, 6,937,440 bytes)
> parseTLD "https://pyropus.ca./"
Nothing
it ::
  Maybe
    (Data.Text.Internal.Text, Data.Text.Internal.Text,
     Data.Text.Internal.Text)
(0.01 secs, 142,328 bytes)

Because all TLDs are implicitly '.' at the end, I would expect that including the '.' would be identical to if not:

> parseTLD "https://pyropus.ca/"
Just ("","pyropus","ca")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0