We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to test and throw warnings based on generated content result.
Examples:
The text was updated successfully, but these errors were encountered:
Sample inclusive-language filter:
inclusive-language
eleventyConfig.addLinter("inclusive-language", function(content, inputPath, outputPath) { let words = "simply,obviously,basically,of course,clearly,just,everyone knows,however,easy".split(","); if( inputPath.endsWith(".md") ) { let found = []; for( let word of words) { word = word.trim(); let regexp = new RegExp("\\b" + word + "\\b", "gi"); if(!!content.match(regexp)) { let split = content.split(regexp); for(let j = 0, k = split.length; j + 1 < k; j++) { found.push( split[j].substr(-30) + chalk.underline(word) + split[j+1].substr(0, 30)); } } } if(found.length) { console.warn(chalk.yellow(`Inclusive Language Linter (${inputPath}):`)); console.warn(" " + found.join("\n" + " ")); } } });
Output:
Sorry, something went wrong.
4bc7600
via https://twitter.com/evaferreira92/status/1039894806200233985
zachleat
No branches or pull requests
Option to test and throw warnings based on generated content result.
Examples:
The text was updated successfully, but these errors were encountered: