aboutsummaryrefslogtreecommitdiff
path: root/lib/document-matchers.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/document-matchers.js')
-rw-r--r--lib/document-matchers.js14
1 files changed, 7 insertions, 7 deletions
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));
};