From 57cc8dff2e5723b8468c2f1fa1020ac2a9144022 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 22 Apr 2014 11:05:42 +0100 Subject: Rename styleName to the more accurate styleId --- lib/document-matchers.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/document-matchers.js') diff --git a/lib/document-matchers.js b/lib/document-matchers.js index a5b5ff5..f116d3f 100644 --- a/lib/document-matchers.js +++ b/lib/document-matchers.js @@ -2,22 +2,22 @@ exports.paragraph = paragraph; exports.run = run; -function paragraph(styleName) { - return new Matcher("paragraph", styleName); +function paragraph(styleId) { + return new Matcher("paragraph", styleId); } -function run(styleName) { - return new Matcher("run", styleName); +function run(styleId) { + return new Matcher("run", styleId); } -function Matcher(elementType, styleName) { +function Matcher(elementType, styleId) { this._elementType = elementType; - this._styleName = styleName; + this._styleId = styleId; } Matcher.prototype.matches = function(element) { return element.type === this._elementType && - (this._styleName === undefined || element.styleName === this._styleName) && + (this._styleId === undefined || element.styleId === this._styleId) && (this._listIndex === undefined || isList(element, this._listIndex, this._listIsOrdered)); }; -- cgit v1.2.3