Package Exports
- retext-syntax-urls
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (retext-syntax-urls) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
retext-syntax-urls

Classify url-like values (example.com, index.html, www.alpha.bravo) as
syntax, not natural language, in retext.
Installation
npm:
npm install retext-syntax-urlsUsage
Without syntax-urls:
var dictionary = require('dictionary-en-gb')
var unified = require('unified')
var english = require('retext-english')
var stringify = require('retext-stringify')
var spell = require('retext-spell')
var urls = require('retext-syntax-urls')
var report = require('vfile-reporter')
unified()
.use(english)
.use(spell, dictionary)
.use(stringify)
.process(
'Have you read readme.md? Check it out: www.example.com/readme.md',
function(err, file) {
console.log(report(err || file))
}
)Yields:
1:15-1:24 warning `readme.md` is misspelt retext-spell retext-spell
1:40-1:55 warning `www.example.com` is misspelt retext-spell retext-spell
1:56-1:65 warning `readme.md` is misspelt retext-spell retext-spell
⚠ 3 warningsWith syntax-urls:
.use(english)
+ .use(urls)
.use(spell, dictionary)Yields:
no issues foundAPI
retext().use(urls)
Classify URLs, paths, and filenames as SourceNodes, which represent
“external (ungrammatical) values” instead of natural language. This hides them
from retext-spell, retext-readability,
retext-equality, and more.
Related
retext-syntax-mentions— Classify @mentions as syntaxretext-spell— Check spellingretext-readability— Check readabilityretext-equality— Check possible insensitive, inconsiderate language
Contribute
See contributing.md in retextjs/retext for ways to get
started.
This organisation has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.