{"id":18910118,"url":"https://github.com/cretezy/linkify","last_synced_at":"2025-08-20T02:32:42.536Z","repository":{"id":39458790,"uuid":"177329005","full_name":"Cretezy/linkify","owner":"Cretezy","description":"Low-level link (text, URLs, emails) parsing library in Dart","archived":false,"fork":false,"pushed_at":"2023-06-01T07:58:03.000Z","size":30,"stargazers_count":63,"open_issues_count":11,"forks_count":50,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T08:25:03.309Z","etag":null,"topics":["dart","linkify"],"latest_commit_sha":null,"homepage":"https://pub.dartlang.org/packages/linkify","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cretezy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-23T19:00:58.000Z","updated_at":"2024-12-24T08:56:57.000Z","dependencies_parsed_at":"2024-06-18T17:11:33.422Z","dependency_job_id":null,"html_url":"https://github.com/Cretezy/linkify","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/Cretezy/linkify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cretezy%2Flinkify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cretezy%2Flinkify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cretezy%2Flinkify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cretezy%2Flinkify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cretezy","download_url":"https://codeload.github.com/Cretezy/linkify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cretezy%2Flinkify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271254670,"owners_count":24727386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","linkify"],"created_at":"2024-11-08T09:41:13.533Z","updated_at":"2025-08-20T02:32:42.276Z","avatar_url":"https://github.com/Cretezy.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `linkify` [![pub package](https://img.shields.io/pub/v/linkify.svg)](https://pub.dartlang.org/packages/linkify)\n\nLow-level link (text, URLs, emails, phone numbers, user tags) parsing library in Dart.\n\nRequired Dart \u003e=2.12 (has null-safety support).\n\n[Flutter library](https://github.com/Cretezy/flutter_linkify).\n\n[Pub](https://pub.dartlang.org/packages/linkify) - [API Docs](https://pub.dartlang.org/documentation/linkify/latest/) - [GitHub](https://github.com/Cretezy/linkify)\n\n## Install\n\nInstall by adding this package to your `pubspec.yaml`:\n\n```yaml\ndependencies:\n  linkify: ^5.0.0\n```\n\n## Usage\n\n```dart\nimport 'package:linkify/linkify.dart';\n\nlinkify(\"Made by https://cretezy.com person@example.com\");\n// Output: [TextElement: 'Made by ', UrlElement: 'https://cretezy.com' (cretezy.com), TextElement: ' ', EmailElement: 'person@example.com' (person@example.com)]\n```\n\n### Options\n\nYou can pass `LinkifyOptions` to the `linkify` method to change the humanization of URLs (turning `https://example.com` to `example.com`):\n\n```dart\nlinkify(\"https://cretezy.com\");\n// [UrlElement: 'https://cretezy.com' (cretezy.com)]\n\nlinkify(\"https://cretezy.com\", options: LinkifyOptions(humanize: false));\n// [UrlElement: 'https://cretezy.com' (https://cretezy.com)]\n```\n\n- `humanize`: Removes http/https from shown URLs\n- `removeWww`: Removes `www.` from shown URLs\n- `looseUrl`: Enables loose URL parsing (should parse most URLs such as `abc.com/xyz`)\n  - `defaultToHttps`: When used with [looseUrl], default to `https` instead of `http`\n- `excludeLastPeriod`: Excludes `.` at end of URLs\n\n### Linkifiers\n\nYou can pass linkifiers to `linkify` as such:\n\n```dart\nlinkify(\"@cretezy\", linkifiers: [UserTagLinkifier()]);\n```\n\nAvailable linkifiers:\n\n- `EmailLinkifier`\n- `UrlLinkifier`\n- `PhoneNumberLinkifier`\n- `UserTagLinkifier`\n\n## Custom Linkifier\n\nYou can write custom linkifiers for phone numbers or other types of links. Look at the [URL linkifier](./lib/src/url.dart) for an example.\n\nThis is the flow:\n\n- Calls `parse` in the linkifier with a list of `LinkifyElement`. This starts as `[TextElement(text)]`\n- Your parsers then splits each element into it's parts. For example, `[TextElement(\"Hello https://example.com\")]` would become `[TextElement(\"Hello \"), UrlElement(\"https://example.com\")]`\n- Each parsers is ran in order of how they are passed to the main `linkify` function. By default, this is URL and email linkifiers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcretezy%2Flinkify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcretezy%2Flinkify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcretezy%2Flinkify/lists"}