{"id":20827007,"url":"https://github.com/retextjs/retext-syntax-urls","last_synced_at":"2025-09-02T12:35:13.443Z","repository":{"id":39999483,"uuid":"99250226","full_name":"retextjs/retext-syntax-urls","owner":"retextjs","description":"plugin to classify url-like values as syntax, not natural language","archived":false,"fork":false,"pushed_at":"2023-09-07T10:52:14.000Z","size":108,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-07T20:44:52.646Z","etag":null,"topics":["file","filename","filepath","natural-language","path","retext","retext-plugin","syntax","url"],"latest_commit_sha":null,"homepage":"https://unifiedjs.com","language":"JavaScript","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/retextjs.png","metadata":{"funding":{"github":"unifiedjs","open_collective":"unified"},"files":{"readme":"readme.md","changelog":null,"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":"2017-08-03T15:54:07.000Z","updated_at":"2023-03-17T13:58:20.000Z","dependencies_parsed_at":"2024-06-18T21:34:04.439Z","dependency_job_id":"7cf14980-8385-4ca4-9428-92385f224ed4","html_url":"https://github.com/retextjs/retext-syntax-urls","commit_stats":{"total_commits":75,"total_committers":1,"mean_commits":75.0,"dds":0.0,"last_synced_commit":"7a9e967cdc16c0c17cdd6c67f99b74416cc22ede"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-syntax-urls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-syntax-urls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-syntax-urls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retextjs%2Fretext-syntax-urls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/retextjs","download_url":"https://codeload.github.com/retextjs/retext-syntax-urls/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954143,"owners_count":21830895,"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","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":["file","filename","filepath","natural-language","path","retext","retext-plugin","syntax","url"],"created_at":"2024-11-17T23:10:48.659Z","updated_at":"2025-05-07T20:44:59.037Z","avatar_url":"https://github.com/retextjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/unifiedjs","https://opencollective.com/unified"],"categories":[],"sub_categories":[],"readme":"# retext-syntax-urls\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n**[retext][]** plugin to classify URL-like values as syntax instead of natural\nlanguage.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`unified().use(retextSyntaxUrls)`](#unifieduseretextsyntaxurls)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package is a [unified][] ([retext][]) plugin to classify URL-like values\n(such as `example.com`, `index.html`, or `www.alpha.bravo`) as\n[`SourceNode`][nlcst-source] instead of natural language.\nThat node represent “external (ungrammatical) values” instead of natural\nlanguage, which hides URLs and paths from [`retext-spell`][retext-spell],\n[`retext-readability`][retext-readability],\n[`retext-equality`][retext-equality], and other things that check words.\n\n## When should I use this?\n\nYou can use this plugin any time there are URLs and paths in prose, that are\n(incorrectly) warned about by linting plugins.\n\n\u003e 👉 **Note**: this is not a markdown parser.\n\u003e Use `unified` with [`remark-parse`][remark-parse] and\n\u003e [`remark-retext`][remark-retext] to “hide” other syntax.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install retext-syntax-urls\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport retextSyntaxUrls from 'https://esm.sh/retext-syntax-urls@4'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import retextSyntaxUrls from 'https://esm.sh/retext-syntax-urls@4?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\nWithout `retext-syntax-urls`:\n\n```js\nimport dictionaryEn from 'dictionary-en'\nimport retextEnglish from 'retext-english'\nimport retextSpell from 'retext-spell'\nimport retextStringify from 'retext-stringify'\nimport retextSyntaxUrls from 'retext-syntax-urls'\nimport {unified} from 'unified'\nimport {reporter} from 'vfile-reporter'\n\nconst file = await unified()\n  .use(retextEnglish)\n  .use(retextSpell, dictionaryEn)\n  .use(retextStringify)\n  .process('Have you read readme.md? Check it out: www.example.com/readme.md')\n\nconsole.log(reporter(file))\n```\n\nYields:\n\n```txt\n1:15-1:24 warning `readme.md` is misspelt                 readme-md       retext-spell\n1:40-1:55 warning `www.example.com` is misspelt           www-example.com retext-spell\n1:56-1:65 warning `readme.md` is misspelt; did you mean ? readme-md       retext-spell\n\n⚠ 3 warnings\n```\n\nWith `retext-syntax-urls`:\n\n```diff\n   .use(retextEnglish)\n+  .use(retextSyntaxUrls)\n   .use(retextSpell, dictionaryEn)\n```\n\nYields:\n\n```txt\nno issues found\n```\n\n## API\n\nThis package exports no identifiers.\nThe default export is [`retextSyntaxUrls`][api-retext-syntax-urls].\n\n### `unified().use(retextSyntaxUrls)`\n\nClassify url-like values (`example.com`, `index.html`, `www.alpha.bravo`) as\nsyntax instead of natural language.\n\n###### Parameters\n\nThere are no parameters.\n\n###### Returns\n\nNothing (`undefined`).\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports no additional types.\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `retext-syntax-urls@^4`,\ncompatible with Node.js 16.\n\n## Related\n\n*   [`retext-syntax-mentions`][retext-syntax-mentions]\n    — classify [**@mentions**](https://github.com/blog/821) as syntax\n*   [`retext-spell`][retext-spell]\n    — check spelling\n*   [`retext-readability`][retext-readability]\n    — check readability\n*   [`retext-equality`][retext-equality]\n    — check possible insensitive, inconsiderate language\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`retextjs/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/retextjs/retext-syntax-urls/workflows/main/badge.svg\n\n[build]: https://github.com/retextjs/retext-syntax-urls/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/retextjs/retext-syntax-urls.svg\n\n[coverage]: https://codecov.io/github/retextjs/retext-syntax-urls\n\n[downloads-badge]: https://img.shields.io/npm/dm/retext-syntax-urls.svg\n\n[downloads]: https://www.npmjs.com/package/retext-syntax-urls\n\n[size-badge]: https://img.shields.io/bundlejs/size/retext-syntax-urls\n\n[size]: https://bundlejs.com/?q=retext-syntax-urls\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/retextjs/retext/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[health]: https://github.com/retextjs/.github\n\n[contributing]: https://github.com/retextjs/.github/blob/main/contributing.md\n\n[support]: https://github.com/retextjs/.github/blob/main/support.md\n\n[coc]: https://github.com/retextjs/.github/blob/main/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[nlcst-source]: https://github.com/syntax-tree/nlcst#source\n\n[remark-parse]: https://github.com/remarkjs/remark/tree/main/packages/remark-parse\n\n[remark-retext]: https://github.com/remarkjs/remark-retext\n\n[retext]: https://github.com/retextjs/retext\n\n[retext-spell]: https://github.com/retextjs/retext-spell\n\n[retext-readability]: https://github.com/retextjs/retext-readability\n\n[retext-equality]: https://github.com/retextjs/retext-equality\n\n[retext-syntax-mentions]: https://github.com/retextjs/retext-syntax-mentions\n\n[unified]: https://github.com/unifiedjs/unified\n\n[api-retext-syntax-urls]: #unifieduseretextsyntaxurls\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretextjs%2Fretext-syntax-urls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretextjs%2Fretext-syntax-urls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretextjs%2Fretext-syntax-urls/lists"}