aboutsummaryrefslogtreecommitdiff
path: root/grunt/bs-lessdoc-parser.js
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2015-04-26 13:53:45 +0300
committerXhmikosR <[email protected]>2015-04-28 11:03:37 +0300
commit3e7ca3bbc8eaa60013d4ab9f2edd42f6dcd8dd4b (patch)
tree968eee9693cf578b4f3f2991f4a482019cf4cf43 /grunt/bs-lessdoc-parser.js
parent4e027718a816f50e9d87acd890644b8f0ecce856 (diff)
downloadbootstrap-3e7ca3bbc8eaa60013d4ab9f2edd42f6dcd8dd4b.tar.xz
bootstrap-3e7ca3bbc8eaa60013d4ab9f2edd42f6dcd8dd4b.zip
Minor lint tweaks.
Diffstat (limited to 'grunt/bs-lessdoc-parser.js')
-rw-r--r--grunt/bs-lessdoc-parser.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/grunt/bs-lessdoc-parser.js b/grunt/bs-lessdoc-parser.js
index d6be77452..d196e766a 100644
--- a/grunt/bs-lessdoc-parser.js
+++ b/grunt/bs-lessdoc-parser.js
@@ -121,7 +121,7 @@ Tokenizer.prototype._shift = function () {
return new VarDocstring(match[1]);
}
var commentStart = line.lastIndexOf('//');
- var varLine = (commentStart === -1) ? line : line.slice(0, commentStart);
+ var varLine = commentStart === -1 ? line : line.slice(0, commentStart);
match = VAR_ASSIGNMENT.exec(varLine);
if (match !== null) {
return new Variable(match[1], match[2]);
@@ -168,8 +168,7 @@ Parser.prototype.parseSection = function () {
var docstring = this._tokenizer.shift();
if (docstring instanceof SectionDocstring) {
section.docstring = docstring;
- }
- else {
+ } else {
this._tokenizer.unshift(docstring);
}
this.parseSubSections(section);
@@ -185,15 +184,14 @@ Parser.prototype.parseSubSections = function (section) {
// Presume an implicit initial subsection
subsection = new SubSection('');
this.parseVars(subsection);
- }
- else {
+ } else {
break;
}
}
section.addSubSection(subsection);
}
- if (section.subsections.length === 1 && !(section.subsections[0].heading) && section.subsections[0].variables.length === 0) {
+ if (section.subsections.length === 1 && !section.subsections[0].heading && section.subsections[0].variables.length === 0) {
// Ignore lone empty implicit subsection
section.subsections = [];
}