@bhsd/codemirror-mediawiki 2.1.12 → 2.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -161,19 +161,28 @@ cm.lint(doc => [
161
161
 
162
162
  *version added: 2.0.9*
163
163
 
164
- **param**: `string` the preferred [CodeMirror extensions](https://codemirror.net/docs/extensions/)
164
+ **param**: `string[] | Record<string, boolean>` the preferred [CodeMirror extensions](https://codemirror.net/docs/extensions/)
165
165
  Set the preferred CodeMirror extensions.
166
166
 
167
167
  ```js
168
168
  cm.prefer([
169
+ 'allowMultipleSelections',
169
170
  'bracketMatching',
170
171
  'closeBrackets',
171
172
  'highlightActiveLine',
172
173
  'highlightSpecialChars',
173
174
  'highlightWhitespace',
174
175
  'highlightTrailingWhitespace',
175
- 'allowMultipleSelections',
176
176
  ]);
177
+ cm.prefer({
178
+ allowMultipleSelections: false,
179
+ bracketMatching: false,
180
+ closeBrackets: false,
181
+ highlightActiveLine: false,
182
+ highlightSpecialChars: false,
183
+ highlightWhitespace: false,
184
+ highlightTrailingWhitespace: false,
185
+ });
177
186
  ```
178
187
 
179
188
  </details>
@@ -32,7 +32,7 @@ export declare class CodeMirror6 {
32
32
  * 添加扩展
33
33
  * @param names 扩展名
34
34
  */
35
- prefer(names: readonly string[]): void;
35
+ prefer(names: string[] | Record<string, boolean>): void;
36
36
  /**
37
37
  * 设置缩进
38
38
  * @param indent 缩进字符串