diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-04-10 13:51:11 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-04-10 13:51:11 +0100 |
| commit | 6ac4b160eab6db7cfc58cb4ede4b5142a36ff7ad (patch) | |
| tree | b31f498a005cb5ef00e5f3eda2d321535f866772 /lib | |
| parent | 83ac75808b14862531b046f51f90014d7dea621e (diff) | |
Fix jshint errors
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/document-matchers.js | 6 | ||||
| -rw-r--r-- | lib/document-to-html.js | 2 | ||||
| -rw-r--r-- | lib/docx/content-types-reader.js | 2 | ||||
| -rw-r--r-- | lib/html-paths.js | 2 | ||||
| -rw-r--r-- | lib/html-writer.js | 6 | ||||
| -rw-r--r-- | lib/main.js | 2 | ||||
| -rw-r--r-- | lib/options-reader.js | 2 | ||||
| -rw-r--r-- | lib/style-reader.js | 4 | ||||
| -rw-r--r-- | lib/unzip.js | 4 | ||||
| -rw-r--r-- | lib/xmlreader.js | 4 |
10 files changed, 17 insertions, 17 deletions
diff --git a/lib/document-matchers.js b/lib/document-matchers.js index e681349..a5b5ff5 100644 --- a/lib/document-matchers.js +++ b/lib/document-matchers.js @@ -19,15 +19,15 @@ Matcher.prototype.matches = function(element) { return element.type === this._elementType && (this._styleName === undefined || element.styleName === this._styleName) && (this._listIndex === undefined || isList(element, this._listIndex, this._listIsOrdered)); -} +}; Matcher.prototype.orderedList = function(levelIndex) { return this.list({isOrdered: true, levelIndex: levelIndex}); -} +}; Matcher.prototype.unorderedList = function(levelIndex) { return this.list({isOrdered: false, levelIndex: levelIndex}); -} +}; Matcher.prototype.list = function(options) { this._listIndex = options.levelIndex; diff --git a/lib/document-to-html.js b/lib/document-to-html.js index ddb8848..16596d7 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -144,5 +144,5 @@ function DocumentConverter(options) { }; return { convertToHtml: convertToHtml - } + }; } diff --git a/lib/docx/content-types-reader.js b/lib/docx/content-types-reader.js index c8a28a4..a5f7ec0 100644 --- a/lib/docx/content-types-reader.js +++ b/lib/docx/content-types-reader.js @@ -34,5 +34,5 @@ function readContentTypesFromXml(xml) { return extensionDefaults[extension]; } } - } + }; } diff --git a/lib/html-paths.js b/lib/html-paths.js index d2456c2..9be13be 100644 --- a/lib/html-paths.js +++ b/lib/html-paths.js @@ -42,7 +42,7 @@ function Element(tagName, attributes, options) { Element.prototype.matchesElement = function(element) { return this.tagNames[element.tagName] && _.isEqual(this.attributes || {}, element.attributes || {}); -} +}; diff --git a/lib/html-writer.js b/lib/html-writer.js index d2fb67b..d329438 100644 --- a/lib/html-writer.js +++ b/lib/html-writer.js @@ -7,7 +7,7 @@ function writer() { var fragments = []; function open(tagName, attributes) { - var attributeString = generateAttributeString(attributes) + var attributeString = generateAttributeString(attributes); fragments.push(util.format("<%s%s>", tagName, attributeString)); } @@ -16,7 +16,7 @@ function writer() { } function selfClosing(tagName, attributes) { - var attributeString = generateAttributeString(attributes) + var attributeString = generateAttributeString(attributes); fragments.push(util.format("<%s%s />", tagName, attributeString)); } @@ -27,7 +27,7 @@ function writer() { } function text(value) { - fragments.push(escapeHtml(value)) + fragments.push(escapeHtml(value)); } function append(html) { diff --git a/lib/main.js b/lib/main.js index 26d146a..1cb9632 100644 --- a/lib/main.js +++ b/lib/main.js @@ -44,7 +44,7 @@ function main(argv) { var outputStream = outputPath ? fs.createWriteStream(outputPath) : process.stdout; outputStream.write(result.value); - }) + }); }).done(); } diff --git a/lib/options-reader.js b/lib/options-reader.js index 015e612..fa807a3 100644 --- a/lib/options-reader.js +++ b/lib/options-reader.js @@ -28,7 +28,7 @@ var standardOptions = exports._standardOptions = { function readOptions(options) { options = options || {}; - var fullOptions = {} + var fullOptions = {}; _.extend(fullOptions, standardOptions, options); fullOptions.styleMap = readStyleMap(options) diff --git a/lib/style-reader.js b/lib/style-reader.js index 463edc5..0e50172 100644 --- a/lib/style-reader.js +++ b/lib/style-reader.js @@ -80,7 +80,7 @@ function documentMatcherRule() { return option.valueOrElse(function() { return function(matcher) { return matcher; - } + }; }); } ); @@ -129,7 +129,7 @@ function htmlPathRule() { attributes["class"] = classNames.join(" "); } if (fresh) { - options["fresh"] = true; + options.fresh = true; } return htmlPaths.element(tagName, attributes, options); }); diff --git a/lib/unzip.js b/lib/unzip.js index ea6f710..e180782 100644 --- a/lib/unzip.js +++ b/lib/unzip.js @@ -38,7 +38,7 @@ function unzipStream(stream) { var exists = function(path) { return names.indexOf(path) !== -1; - } + }; function readEntry(entry) { var readDeferred = promises.defer(); @@ -51,7 +51,7 @@ function unzipStream(stream) { .on("end", function() { readDeferred.resolve(buffers); }) - .on("error", readDeferred.reject.bind(readDeferred)) + .on("error", readDeferred.reject.bind(readDeferred)); return readDeferred.promise; } diff --git a/lib/xmlreader.js b/lib/xmlreader.js index e5ed672..51f24a7 100644 --- a/lib/xmlreader.js +++ b/lib/xmlreader.js @@ -25,7 +25,7 @@ function read(xmlString, namespaceMap) { var element = new Element(mapName(node), attributes); currentElement.children.push(element); stack.push(currentElement); - currentElement = element + currentElement = element; }; function mapName(node) { @@ -96,7 +96,7 @@ Element.prototype.first = function(name) { return _.find(this.children, function(child) { return child.name == name; }); -} +}; Element.prototype.getElementsByTagName = function(name) { var elements = _.filter(this.children, function(child) { |
