aboutsummaryrefslogtreecommitdiff
path: root/lib/document-matchers.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-04-22 11:05:42 +0100
committerMichael Williamson <mike@zwobble.org>2014-04-22 11:05:42 +0100
commit57cc8dff2e5723b8468c2f1fa1020ac2a9144022 (patch)
treed04cc33addc704c07696aa44a4503c5e5388fad5 /lib/document-matchers.js
parentbc8e8b44a05041bc656e83a87d857ec58ba0b4fe (diff)
Rename styleName to the more accurate styleId
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));
};