Skip to content

Commit

Permalink
docs: Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Sep 14, 2020
1 parent 6e01ed2 commit 3ab59c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Defaults: Disallows to use `!?!?`.

- `allow`: `string[]`,
- allow word list that suppor [RegExp-like String](https://github.com/textlint/textlint-filter-rule-allowlist#regexp-like-string)
- some unique noun is allowed by default
- Default: `[]`
- `allowHalfWidthExclamation`: `boolean`
- allow to use !
- Default: `false`
Expand Down
4 changes: 2 additions & 2 deletions src/textlint-rule-no-exclamation-question-mark.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const isIgnoredRange = (matchPatternResults, actual) => {
});
};

const DEFAULT_ALLOW_LIST = ["Yahoo!"];
const BUILTIN_ALLOW_LIST = ["Yahoo!"];
const defaultOptions = {
// allow words
allow: [],
Expand All @@ -39,7 +39,7 @@ const Mark = {
module.exports = function (context, options = defaultOptions) {
const { Syntax, RuleError, report, getSource } = context;
const helper = new RuleHelper(context);
const allow = (options.allow || defaultOptions.allow).concat(DEFAULT_ALLOW_LIST);
const allow = (options.allow || defaultOptions.allow).concat(BUILTIN_ALLOW_LIST);
const allowHalfWidthExclamation = options.allowHalfWidthExclamation || defaultOptions.allowHalfWidthExclamation;
const allowFullWidthExclamation = options.allowFullWidthExclamation || defaultOptions.allowFullWidthExclamation;
const allowHalfWidthQuestion = options.allowHalfWidthQuestion || defaultOptions.allowHalfWidthQuestion;
Expand Down

0 comments on commit 3ab59c5

Please sign in to comment.