Skip to content

Conversation

lionel-rowe
Copy link

Partially fixes #119

  • Fixed: localhost:port URLs are now correctly delimited and no longer cause malformed HTML when passing existing <a> tags through anchorme
  • Not fixed: host and port metadata are still missing from list results. This also applies to non-Latin-text URLs such as http://www.عربي.com and is due to the confirmedByProtocol regex fragment not capturing those parts. Might be worth fixing at some stage, but for now that metadata is simply missing for those types of URL (which is compatible with the TypeScript definitions). In any case, consumers in environments that support the native URL constructor can just use that to parse the URLs if needed:
    const url = anchorme.list('http://localhost:8888')[0]
    url.port // undefined
    new URL(url.string).port // '8888'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Urls with localhost:port number will not work

1 participant