Skip to content

Commit 5a75deb

Browse files
Comment capitalization, to match the rest of the comments
1 parent 45ffc6c commit 5a75deb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/resolve-value.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var gatherVariableDependencies = require('./gather-variable-dependencies');
77
var findNodeAncestorWithSelector = require('./find-node-ancestor-with-selector');
88
var cloneSpliceParentOntoNodeWhen = require('./clone-splice-parent-onto-node-when');
99

10-
// regex to capture variable names
10+
// Regexp to capture variable names
1111
var RE_VAR_FUNC = (/var\(\s*(--[^,\s)]+)/);
1212

1313
function toString(value) {
@@ -35,12 +35,12 @@ var resolveValue = function(decl, map, /*optional*/ignorePseudoScope, /*internal
3535
var warnings = [];
3636

3737

38-
// match all variables first, to gather all available variables in decl.value
38+
// Match all variables first so we can later on if there are circular dependencies
3939
var variablesUsedInValue = [];
4040
while ((matchingVarDecl = RE_VAR_FUNC_G.exec(resultantValue))) {
4141
variablesUsedInValue.push(matchingVarDecl[1]);
4242
}
43-
// remove duplicates from array
43+
// Remove duplicates from array
4444
variablesUsedInValue = variablesUsedInValue.filter(filterDistinct);
4545

4646
//console.log(debugIndent, (_debugIsInternal ? '' : 'Try resolving'), generateScopeList(decl.parent, true), `ignorePseudoScope=${ignorePseudoScope}`, '------------------------');
@@ -55,10 +55,10 @@ var resolveValue = function(decl, map, /*optional*/ignorePseudoScope, /*internal
5555
var matchingVarDeclMapItem = undefined;
5656

5757
// Split at the comma to find variable name and fallback value
58-
// There may be other commas in the values so this isn't necessary just 2 pieces
58+
// There may be other commas in the values so this isn't necessarily just 2 pieces
5959
var variableFallbackSplitPieces = matchingVarDecl.body.split(',');
6060

61-
// get variable name and fallback, filtering empty items
61+
// Get variable name and fallback, filtering empty items
6262
var variableName = variableFallbackSplitPieces[0].trim();
6363
var fallback = variableFallbackSplitPieces.length > 1 ? variableFallbackSplitPieces.slice(1).join(',').trim() : undefined;
6464

@@ -112,7 +112,7 @@ var resolveValue = function(decl, map, /*optional*/ignorePseudoScope, /*internal
112112
warnings.push(['variable ' + variableName + ' is undefined and used without a fallback', { node: decl }]);
113113
}
114114

115-
// replace original declaration
115+
// Replace original declaration with found value
116116
resultantValue = (matchingVarDecl.pre || '') + replaceValue + (matchingVarDecl.post || '')
117117
}
118118

0 commit comments

Comments
 (0)