vscode-css-languageservice 5.4.2 → 6.1.0

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.
Files changed (83) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/SECURITY.md +41 -0
  3. package/lib/esm/beautify/beautify-css.js +11 -4
  4. package/lib/esm/cssLanguageService.d.ts +2 -1
  5. package/lib/esm/cssLanguageService.js +15 -17
  6. package/lib/esm/cssLanguageTypes.js +2 -2
  7. package/lib/esm/data/webCustomData.js +356 -232
  8. package/lib/esm/languageFacts/builtinData.js +15 -15
  9. package/lib/esm/languageFacts/colors.js +66 -69
  10. package/lib/esm/languageFacts/dataManager.js +38 -42
  11. package/lib/esm/languageFacts/dataProvider.js +17 -23
  12. package/lib/esm/languageFacts/entry.js +22 -23
  13. package/lib/esm/parser/cssErrors.js +5 -7
  14. package/lib/esm/parser/cssNodes.js +869 -1377
  15. package/lib/esm/parser/cssParser.js +419 -376
  16. package/lib/esm/parser/cssScanner.js +168 -175
  17. package/lib/esm/parser/cssSymbolScope.js +107 -137
  18. package/lib/esm/parser/lessParser.js +177 -202
  19. package/lib/esm/parser/lessScanner.js +22 -43
  20. package/lib/esm/parser/scssErrors.js +5 -7
  21. package/lib/esm/parser/scssParser.js +196 -208
  22. package/lib/esm/parser/scssScanner.js +33 -54
  23. package/lib/esm/services/cssCodeActions.js +36 -40
  24. package/lib/esm/services/cssCompletion.js +300 -395
  25. package/lib/esm/services/cssFolding.js +32 -35
  26. package/lib/esm/services/cssFormatter.js +22 -22
  27. package/lib/esm/services/cssHover.js +30 -33
  28. package/lib/esm/services/cssNavigation.js +260 -289
  29. package/lib/esm/services/cssSelectionRange.js +6 -6
  30. package/lib/esm/services/cssValidation.js +13 -16
  31. package/lib/esm/services/lessCompletion.js +351 -370
  32. package/lib/esm/services/lint.js +161 -175
  33. package/lib/esm/services/lintRules.js +20 -27
  34. package/lib/esm/services/lintUtil.js +19 -28
  35. package/lib/esm/services/pathCompletion.js +84 -158
  36. package/lib/esm/services/scssCompletion.js +283 -307
  37. package/lib/esm/services/scssNavigation.js +65 -137
  38. package/lib/esm/services/selectorPrinting.js +131 -175
  39. package/lib/esm/utils/arrays.js +6 -12
  40. package/lib/esm/utils/objects.js +1 -1
  41. package/lib/esm/utils/resources.js +3 -16
  42. package/lib/esm/utils/strings.js +10 -12
  43. package/lib/umd/beautify/beautify-css.js +11 -4
  44. package/lib/umd/cssLanguageService.d.ts +2 -1
  45. package/lib/umd/cssLanguageService.js +34 -32
  46. package/lib/umd/cssLanguageTypes.js +4 -3
  47. package/lib/umd/data/webCustomData.js +355 -231
  48. package/lib/umd/languageFacts/colors.js +65 -68
  49. package/lib/umd/languageFacts/dataManager.js +41 -44
  50. package/lib/umd/languageFacts/dataProvider.js +17 -22
  51. package/lib/umd/languageFacts/entry.js +22 -23
  52. package/lib/umd/languageFacts/facts.js +5 -1
  53. package/lib/umd/parser/cssErrors.js +5 -6
  54. package/lib/umd/parser/cssNodes.js +870 -1307
  55. package/lib/umd/parser/cssParser.js +424 -380
  56. package/lib/umd/parser/cssScanner.js +168 -173
  57. package/lib/umd/parser/cssSymbolScope.js +109 -134
  58. package/lib/umd/parser/lessParser.js +182 -206
  59. package/lib/umd/parser/lessScanner.js +22 -42
  60. package/lib/umd/parser/scssErrors.js +5 -6
  61. package/lib/umd/parser/scssParser.js +202 -213
  62. package/lib/umd/parser/scssScanner.js +25 -45
  63. package/lib/umd/services/cssCodeActions.js +41 -44
  64. package/lib/umd/services/cssCompletion.js +308 -402
  65. package/lib/umd/services/cssFolding.js +35 -38
  66. package/lib/umd/services/cssFormatter.js +25 -25
  67. package/lib/umd/services/cssHover.js +36 -38
  68. package/lib/umd/services/cssNavigation.js +267 -295
  69. package/lib/umd/services/cssSelectionRange.js +8 -8
  70. package/lib/umd/services/cssValidation.js +17 -19
  71. package/lib/umd/services/lessCompletion.js +354 -372
  72. package/lib/umd/services/lint.js +167 -180
  73. package/lib/umd/services/lintRules.js +20 -24
  74. package/lib/umd/services/lintUtil.js +20 -28
  75. package/lib/umd/services/pathCompletion.js +87 -160
  76. package/lib/umd/services/scssCompletion.js +287 -310
  77. package/lib/umd/services/scssNavigation.js +69 -140
  78. package/lib/umd/services/selectorPrinting.js +134 -174
  79. package/lib/umd/utils/arrays.js +6 -12
  80. package/lib/umd/utils/objects.js +1 -1
  81. package/lib/umd/utils/resources.js +4 -17
  82. package/lib/umd/utils/strings.js +10 -12
  83. package/package.json +16 -15
@@ -14,11 +14,11 @@
14
14
  'use strict';
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.getFoldingRanges = void 0;
17
- var cssScanner_1 = require("../parser/cssScanner");
18
- var scssScanner_1 = require("../parser/scssScanner");
19
- var lessScanner_1 = require("../parser/lessScanner");
17
+ const cssScanner_1 = require("../parser/cssScanner");
18
+ const scssScanner_1 = require("../parser/scssScanner");
19
+ const lessScanner_1 = require("../parser/lessScanner");
20
20
  function getFoldingRanges(document, context) {
21
- var ranges = computeFoldingRanges(document);
21
+ const ranges = computeFoldingRanges(document);
22
22
  return limitFoldingRanges(ranges, context);
23
23
  }
24
24
  exports.getFoldingRanges = getFoldingRanges;
@@ -40,27 +40,27 @@
40
40
  }
41
41
  }
42
42
  function tokenToRange(t, kind) {
43
- var startLine = getStartLine(t);
44
- var endLine = getEndLine(t);
43
+ const startLine = getStartLine(t);
44
+ const endLine = getEndLine(t);
45
45
  if (startLine !== endLine) {
46
46
  return {
47
- startLine: startLine,
48
- endLine: endLine,
49
- kind: kind
47
+ startLine,
48
+ endLine,
49
+ kind
50
50
  };
51
51
  }
52
52
  else {
53
53
  return null;
54
54
  }
55
55
  }
56
- var ranges = [];
57
- var delimiterStack = [];
58
- var scanner = getScanner();
56
+ const ranges = [];
57
+ const delimiterStack = [];
58
+ const scanner = getScanner();
59
59
  scanner.ignoreComment = false;
60
60
  scanner.setSource(document.getText());
61
- var token = scanner.scan();
62
- var prevToken = null;
63
- var _loop_1 = function () {
61
+ let token = scanner.scan();
62
+ let prevToken = null;
63
+ while (token.type !== cssScanner_1.TokenType.EOF) {
64
64
  switch (token.type) {
65
65
  case cssScanner_1.TokenType.CurlyL:
66
66
  case scssScanner_1.InterpolationFunction:
@@ -70,11 +70,11 @@
70
70
  }
71
71
  case cssScanner_1.TokenType.CurlyR: {
72
72
  if (delimiterStack.length !== 0) {
73
- var prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'brace');
73
+ const prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'brace');
74
74
  if (!prevDelimiter) {
75
75
  break;
76
76
  }
77
- var endLine = getEndLine(token);
77
+ let endLine = getEndLine(token);
78
78
  if (prevDelimiter.type === 'brace') {
79
79
  /**
80
80
  * Other than the case when curly brace is not on a new line by itself, for example
@@ -88,7 +88,7 @@
88
88
  if (prevDelimiter.line !== endLine) {
89
89
  ranges.push({
90
90
  startLine: prevDelimiter.line,
91
- endLine: endLine,
91
+ endLine,
92
92
  kind: undefined
93
93
  });
94
94
  }
@@ -101,7 +101,7 @@
101
101
  * All comments are marked as `Comment`
102
102
  */
103
103
  case cssScanner_1.TokenType.Comment: {
104
- var commentRegionMarkerToDelimiter_1 = function (marker) {
104
+ const commentRegionMarkerToDelimiter = (marker) => {
105
105
  if (marker === '#region') {
106
106
  return { line: getStartLine(token), type: 'comment', isStart: true };
107
107
  }
@@ -109,20 +109,20 @@
109
109
  return { line: getEndLine(token), type: 'comment', isStart: false };
110
110
  }
111
111
  };
112
- var getCurrDelimiter = function (token) {
113
- var matches = token.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);
112
+ const getCurrDelimiter = (token) => {
113
+ const matches = token.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);
114
114
  if (matches) {
115
- return commentRegionMarkerToDelimiter_1(matches[1]);
115
+ return commentRegionMarkerToDelimiter(matches[1]);
116
116
  }
117
117
  else if (document.languageId === 'scss' || document.languageId === 'less') {
118
- var matches_1 = token.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);
119
- if (matches_1) {
120
- return commentRegionMarkerToDelimiter_1(matches_1[1]);
118
+ const matches = token.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);
119
+ if (matches) {
120
+ return commentRegionMarkerToDelimiter(matches[1]);
121
121
  }
122
122
  }
123
123
  return null;
124
124
  };
125
- var currDelimiter = getCurrDelimiter(token);
125
+ const currDelimiter = getCurrDelimiter(token);
126
126
  // /* */ comment region folding
127
127
  // All #region and #endregion cases
128
128
  if (currDelimiter) {
@@ -130,7 +130,7 @@
130
130
  delimiterStack.push(currDelimiter);
131
131
  }
132
132
  else {
133
- var prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'comment');
133
+ const prevDelimiter = popPrevStartDelimiterOfType(delimiterStack, 'comment');
134
134
  if (!prevDelimiter) {
135
135
  break;
136
136
  }
@@ -147,7 +147,7 @@
147
147
  }
148
148
  // Multiline comment case
149
149
  else {
150
- var range = tokenToRange(token, 'comment');
150
+ const range = tokenToRange(token, 'comment');
151
151
  if (range) {
152
152
  ranges.push(range);
153
153
  }
@@ -157,9 +157,6 @@
157
157
  }
158
158
  prevToken = token;
159
159
  token = scanner.scan();
160
- };
161
- while (token.type !== cssScanner_1.TokenType.EOF) {
162
- _loop_1();
163
160
  }
164
161
  return ranges;
165
162
  }
@@ -167,7 +164,7 @@
167
164
  if (stack.length === 0) {
168
165
  return null;
169
166
  }
170
- for (var i = stack.length - 1; i >= 0; i--) {
167
+ for (let i = stack.length - 1; i >= 0; i--) {
171
168
  if (stack[i].type === type && stack[i].isStart) {
172
169
  return stack.splice(i, 1)[0];
173
170
  }
@@ -180,17 +177,17 @@
180
177
  * - If limit exceeds, only return `rangeLimit` amount of ranges
181
178
  */
182
179
  function limitFoldingRanges(ranges, context) {
183
- var maxRanges = context && context.rangeLimit || Number.MAX_VALUE;
184
- var sortedRanges = ranges.sort(function (r1, r2) {
185
- var diff = r1.startLine - r2.startLine;
180
+ const maxRanges = context && context.rangeLimit || Number.MAX_VALUE;
181
+ const sortedRanges = ranges.sort((r1, r2) => {
182
+ let diff = r1.startLine - r2.startLine;
186
183
  if (diff === 0) {
187
184
  diff = r1.endLine - r2.endLine;
188
185
  }
189
186
  return diff;
190
187
  });
191
- var validRanges = [];
192
- var prevEndLine = -1;
193
- sortedRanges.forEach(function (r) {
188
+ const validRanges = [];
189
+ let prevEndLine = -1;
190
+ sortedRanges.forEach(r => {
194
191
  if (!(r.startLine < prevEndLine && prevEndLine < r.endLine)) {
195
192
  validRanges.push(r);
196
193
  prevEndLine = r.endLine;
@@ -14,19 +14,19 @@
14
14
  "use strict";
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.format = void 0;
17
- var cssLanguageTypes_1 = require("../cssLanguageTypes");
18
- var beautify_css_1 = require("../beautify/beautify-css");
19
- var strings_1 = require("../utils/strings");
17
+ const cssLanguageTypes_1 = require("../cssLanguageTypes");
18
+ const beautify_css_1 = require("../beautify/beautify-css");
19
+ const strings_1 = require("../utils/strings");
20
20
  function format(document, range, options) {
21
- var value = document.getText();
22
- var includesEnd = true;
23
- var initialIndentLevel = 0;
24
- var inRule = false;
25
- var tabSize = options.tabSize || 4;
21
+ let value = document.getText();
22
+ let includesEnd = true;
23
+ let initialIndentLevel = 0;
24
+ let inRule = false;
25
+ const tabSize = options.tabSize || 4;
26
26
  if (range) {
27
- var startOffset = document.offsetAt(range.start);
27
+ let startOffset = document.offsetAt(range.start);
28
28
  // include all leading whitespace iff at the beginning of the line
29
- var extendedStart = startOffset;
29
+ let extendedStart = startOffset;
30
30
  while (extendedStart > 0 && isWhitespace(value, extendedStart - 1)) {
31
31
  extendedStart--;
32
32
  }
@@ -40,8 +40,8 @@
40
40
  }
41
41
  }
42
42
  // include all following whitespace until the end of the line
43
- var endOffset = document.offsetAt(range.end);
44
- var extendedEnd = endOffset;
43
+ let endOffset = document.offsetAt(range.end);
44
+ let extendedEnd = endOffset;
45
45
  while (extendedEnd < value.length && isWhitespace(value, extendedEnd)) {
46
46
  extendedEnd++;
47
47
  }
@@ -54,17 +54,17 @@
54
54
  includesEnd = endOffset === value.length;
55
55
  value = value.substring(startOffset, endOffset);
56
56
  if (startOffset !== 0) {
57
- var startOfLineOffset = document.offsetAt(cssLanguageTypes_1.Position.create(range.start.line, 0));
57
+ const startOfLineOffset = document.offsetAt(cssLanguageTypes_1.Position.create(range.start.line, 0));
58
58
  initialIndentLevel = computeIndentLevel(document.getText(), startOfLineOffset, options);
59
59
  }
60
60
  if (inRule) {
61
- value = "{\n".concat(trimLeft(value));
61
+ value = `{\n${trimLeft(value)}`;
62
62
  }
63
63
  }
64
64
  else {
65
65
  range = cssLanguageTypes_1.Range.create(cssLanguageTypes_1.Position.create(0, 0), document.positionAt(value.length));
66
66
  }
67
- var cssOptions = {
67
+ const cssOptions = {
68
68
  indent_size: tabSize,
69
69
  indent_char: options.insertSpaces ? ' ' : '\t',
70
70
  end_with_newline: includesEnd && getFormatOption(options, 'insertFinalNewline', false),
@@ -78,12 +78,12 @@
78
78
  wrap_line_length: getFormatOption(options, 'wrapLineLength', undefined),
79
79
  eol: '\n'
80
80
  };
81
- var result = (0, beautify_css_1.css_beautify)(value, cssOptions);
81
+ let result = (0, beautify_css_1.css_beautify)(value, cssOptions);
82
82
  if (inRule) {
83
83
  result = trimLeft(result.substring(2));
84
84
  }
85
85
  if (initialIndentLevel > 0) {
86
- var indent = options.insertSpaces ? (0, strings_1.repeat)(' ', tabSize * initialIndentLevel) : (0, strings_1.repeat)('\t', initialIndentLevel);
86
+ const indent = options.insertSpaces ? (0, strings_1.repeat)(' ', tabSize * initialIndentLevel) : (0, strings_1.repeat)('\t', initialIndentLevel);
87
87
  result = result.split('\n').join('\n' + indent);
88
88
  if (range.start.character === 0) {
89
89
  result = indent + result; // keep the indent
@@ -98,11 +98,11 @@
98
98
  function trimLeft(str) {
99
99
  return str.replace(/^\s+/, '');
100
100
  }
101
- var _CUL = '{'.charCodeAt(0);
102
- var _CUR = '}'.charCodeAt(0);
101
+ const _CUL = '{'.charCodeAt(0);
102
+ const _CUR = '}'.charCodeAt(0);
103
103
  function isInRule(str, offset) {
104
104
  while (offset >= 0) {
105
- var ch = str.charCodeAt(offset);
105
+ const ch = str.charCodeAt(offset);
106
106
  if (ch === _CUL) {
107
107
  return true;
108
108
  }
@@ -115,7 +115,7 @@
115
115
  }
116
116
  function getFormatOption(options, key, dflt) {
117
117
  if (options && options.hasOwnProperty(key)) {
118
- var value = options[key];
118
+ const value = options[key];
119
119
  if (value !== null) {
120
120
  return value;
121
121
  }
@@ -123,11 +123,11 @@
123
123
  return dflt;
124
124
  }
125
125
  function computeIndentLevel(content, offset, options) {
126
- var i = offset;
127
- var nChars = 0;
128
- var tabSize = options.tabSize || 4;
126
+ let i = offset;
127
+ let nChars = 0;
128
+ const tabSize = options.tabSize || 4;
129
129
  while (i < content.length) {
130
- var ch = content.charAt(i);
130
+ const ch = content.charAt(i);
131
131
  if (ch === ' ') {
132
132
  nChars++;
133
133
  }
@@ -14,35 +14,34 @@
14
14
  'use strict';
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.CSSHover = void 0;
17
- var nodes = require("../parser/cssNodes");
18
- var languageFacts = require("../languageFacts/facts");
19
- var selectorPrinting_1 = require("./selectorPrinting");
20
- var strings_1 = require("../utils/strings");
21
- var cssLanguageTypes_1 = require("../cssLanguageTypes");
22
- var objects_1 = require("../utils/objects");
23
- var CSSHover = /** @class */ (function () {
24
- function CSSHover(clientCapabilities, cssDataManager) {
17
+ const nodes = require("../parser/cssNodes");
18
+ const languageFacts = require("../languageFacts/facts");
19
+ const selectorPrinting_1 = require("./selectorPrinting");
20
+ const strings_1 = require("../utils/strings");
21
+ const cssLanguageTypes_1 = require("../cssLanguageTypes");
22
+ const objects_1 = require("../utils/objects");
23
+ class CSSHover {
24
+ constructor(clientCapabilities, cssDataManager) {
25
25
  this.clientCapabilities = clientCapabilities;
26
26
  this.cssDataManager = cssDataManager;
27
27
  this.selectorPrinting = new selectorPrinting_1.SelectorPrinting(cssDataManager);
28
28
  }
29
- CSSHover.prototype.configure = function (settings) {
29
+ configure(settings) {
30
30
  this.defaultSettings = settings;
31
- };
32
- CSSHover.prototype.doHover = function (document, position, stylesheet, settings) {
33
- if (settings === void 0) { settings = this.defaultSettings; }
31
+ }
32
+ doHover(document, position, stylesheet, settings = this.defaultSettings) {
34
33
  function getRange(node) {
35
34
  return cssLanguageTypes_1.Range.create(document.positionAt(node.offset), document.positionAt(node.end));
36
35
  }
37
- var offset = document.offsetAt(position);
38
- var nodepath = nodes.getNodePath(stylesheet, offset);
36
+ const offset = document.offsetAt(position);
37
+ const nodepath = nodes.getNodePath(stylesheet, offset);
39
38
  /**
40
39
  * nodepath is top-down
41
40
  * Build up the hover by appending inner node's information
42
41
  */
43
- var hover = null;
44
- for (var i = 0; i < nodepath.length; i++) {
45
- var node = nodepath[i];
42
+ let hover = null;
43
+ for (let i = 0; i < nodepath.length; i++) {
44
+ const node = nodepath[i];
46
45
  if (node instanceof nodes.Selector) {
47
46
  hover = {
48
47
  contents: this.selectorPrinting.selectorToMarkedString(node),
@@ -63,13 +62,13 @@
63
62
  break;
64
63
  }
65
64
  if (node instanceof nodes.Declaration) {
66
- var propertyName = node.getFullPropertyName();
67
- var entry = this.cssDataManager.getProperty(propertyName);
65
+ const propertyName = node.getFullPropertyName();
66
+ const entry = this.cssDataManager.getProperty(propertyName);
68
67
  if (entry) {
69
- var contents = languageFacts.getEntryDescription(entry, this.doesSupportMarkdown(), settings);
68
+ const contents = languageFacts.getEntryDescription(entry, this.doesSupportMarkdown(), settings);
70
69
  if (contents) {
71
70
  hover = {
72
- contents: contents,
71
+ contents,
73
72
  range: getRange(node)
74
73
  };
75
74
  }
@@ -80,13 +79,13 @@
80
79
  continue;
81
80
  }
82
81
  if (node instanceof nodes.UnknownAtRule) {
83
- var atRuleName = node.getText();
84
- var entry = this.cssDataManager.getAtDirective(atRuleName);
82
+ const atRuleName = node.getText();
83
+ const entry = this.cssDataManager.getAtDirective(atRuleName);
85
84
  if (entry) {
86
- var contents = languageFacts.getEntryDescription(entry, this.doesSupportMarkdown(), settings);
85
+ const contents = languageFacts.getEntryDescription(entry, this.doesSupportMarkdown(), settings);
87
86
  if (contents) {
88
87
  hover = {
89
- contents: contents,
88
+ contents,
90
89
  range: getRange(node)
91
90
  };
92
91
  }
@@ -97,15 +96,15 @@
97
96
  continue;
98
97
  }
99
98
  if (node instanceof nodes.Node && node.type === nodes.NodeType.PseudoSelector) {
100
- var selectorName = node.getText();
101
- var entry = selectorName.slice(0, 2) === '::'
99
+ const selectorName = node.getText();
100
+ const entry = selectorName.slice(0, 2) === '::'
102
101
  ? this.cssDataManager.getPseudoElement(selectorName)
103
102
  : this.cssDataManager.getPseudoClass(selectorName);
104
103
  if (entry) {
105
- var contents = languageFacts.getEntryDescription(entry, this.doesSupportMarkdown(), settings);
104
+ const contents = languageFacts.getEntryDescription(entry, this.doesSupportMarkdown(), settings);
106
105
  if (contents) {
107
106
  hover = {
108
- contents: contents,
107
+ contents,
109
108
  range: getRange(node)
110
109
  };
111
110
  }
@@ -120,8 +119,8 @@
120
119
  hover.contents = this.convertContents(hover.contents);
121
120
  }
122
121
  return hover;
123
- };
124
- CSSHover.prototype.convertContents = function (contents) {
122
+ }
123
+ convertContents(contents) {
125
124
  if (!this.doesSupportMarkdown()) {
126
125
  if (typeof contents === 'string') {
127
126
  return contents;
@@ -135,7 +134,7 @@
135
134
  }
136
135
  // MarkedString[]
137
136
  else if (Array.isArray(contents)) {
138
- return contents.map(function (c) {
137
+ return contents.map(c => {
139
138
  return typeof c === 'string' ? c : c.value;
140
139
  });
141
140
  }
@@ -145,19 +144,18 @@
145
144
  }
146
145
  }
147
146
  return contents;
148
- };
149
- CSSHover.prototype.doesSupportMarkdown = function () {
147
+ }
148
+ doesSupportMarkdown() {
150
149
  if (!(0, objects_1.isDefined)(this.supportsMarkdown)) {
151
150
  if (!(0, objects_1.isDefined)(this.clientCapabilities)) {
152
151
  this.supportsMarkdown = true;
153
152
  return this.supportsMarkdown;
154
153
  }
155
- var hover = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.hover;
154
+ const hover = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.hover;
156
155
  this.supportsMarkdown = hover && hover.contentFormat && Array.isArray(hover.contentFormat) && hover.contentFormat.indexOf(cssLanguageTypes_1.MarkupKind.Markdown) !== -1;
157
156
  }
158
157
  return this.supportsMarkdown;
159
- };
160
- return CSSHover;
161
- }());
158
+ }
159
+ }
162
160
  exports.CSSHover = CSSHover;
163
161
  });