18
19
constructor(config: LanguageConfiguration) {
21
this._autoClosingPairs = config.autoClosingPairs.map(el => new StandardAutoClosingPairConditional(el));
23
this._autoClosingPairs = config.brackets.map(b => new StandardAutoClosingPairConditional({ open: b[0], close: b[1] }));
24
} else {
25
this._autoClosingPairs = [];
26
}
28
>
if (config.__electricCharacterSupport && config.__electricCharacterSupport.docComment) {
29
const docComment = config.__electricCharacterSupport.docComment;
30
// IDocComment is legacy, only partially supported
31
this._autoClosingPairs.push(new StandardAutoClosingPairConditional({ open: docComment.open, close: docComment.close || '' }));
32
}
34
>
this._autoCloseBeforeForQuotes = typeof config.autoCloseBefore === 'string' ? config.autoCloseBefore : CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES;
35
>
this._autoCloseBeforeForBrackets = typeof config.autoCloseBefore === 'string' ? config.autoCloseBefore : CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS;
36
>
37
>
this._surroundingPairs = config.surroundingPairs || this._autoClosingPairs;
38
>
}
39
40
public getAutoClosingPairs(): StandardAutoClosingPairConditional[] {