Skip to content

Commit 13ac5a9

Browse files
committed
ref ryu1kn#25 Updated README
1 parent 0e71720 commit 13ac5a9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@
4949

5050
Each rule has `match`, `replaceWith` and optionally `name`.
5151

52-
* `name`: Optional. Name of the rule to describe what the rule is for.
52+
* `name`: Optional. Name of the rule to describe what the rule is for. You see this name on normalisation rule toggle menu.
5353
* `match`: Regular expression to find text you want to normalise. [Global search flag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions?redirectlocale=en-US&redirectslug=JavaScript%2FGuide%2FRegular_Expressions#Advanced_searching_with_flags) is automatically applied.
5454
* `replaceWith`: One of the following
5555
* **Replacement text** as a string. You can use `$N`, where `N` is the index of substring (starting from 1) you captured in `match` with `()`.
5656
* **Letter case specification** as an object. Valid cases are `upper` and `lower`.
57+
* `enableOnStart`: Optional. Set it `false` if you don't want to use the rule when the extension starts up.
5758

5859
Sample `preComparisonTextNormalizationRules`:
5960

@@ -72,7 +73,8 @@
7273
{
7374
"name": "Capitalise",
7475
"match": ".*",
75-
"replaceWith": {"letterCase": "upper"}
76+
"replaceWith": {"letterCase": "upper"},
77+
"enableOnStart": false
7678
}
7779
...
7880
]

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@
6969
]
7070
}
7171
]
72+
},
73+
"enableOnStart": {
74+
"type": "boolean",
75+
"default": true
7276
}
7377
},
7478
"required": [

0 commit comments

Comments
 (0)