Closed bkeepers closed 7 years ago
😬
I just tested it and it worked for me. Could you provide more info on what fails and how I can reproduce it?
Sorry, I mis-diagnosed the issue. It turns out the error is caused by the username being at the very end of the input.
Here is an example that shows it:
var dictionary = require('dictionary-en-us');
var retext = require('retext');
var english = require('retext-english');
var spell = require('retext-spell');
var mentions = require('retext-syntax-mentions');
var report = require('vfile-reporter');
retext().use(english).use(mentions).use(spell, dictionary).process([
'Misspelt? @wooorm'
].join('\n'), function (err, file) {
console.log(report(err || file));
});
Note that this is identical to the example in the README, except:
- 'Misspelt? @wooorm.'
+ 'Misspelt? @wooorm'
].join('\n'), function (err, file) {
Ah, great, weird that I hadn’t tested @
s near the end of a sentence.
Thanks for the issue, and happy New Year! 🎆🎇
Given@foo-bar
(which is a valid github username), this plugin will throw an error:Given
Hello @foo-bar
, this plugin will throw an error: