diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-05-04 11:02:56 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-05-04 11:02:56 +0100 |
| commit | 8cf5cf90366a4f5f8e0efaf3bb39c0c4f8f512e0 (patch) | |
| tree | 7e8e2e9825ea0758315b6628e37c36b147a0cdb2 /lib | |
| parent | 2fb0cb2820dee31b4e48937586f7f98c7ec8aa61 (diff) | |
Fix list index 0 matching any paragraph
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/document-matchers.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/document-matchers.js b/lib/document-matchers.js index 58b3204..e681349 100644 --- a/lib/document-matchers.js +++ b/lib/document-matchers.js @@ -17,8 +17,8 @@ function Matcher(elementType, styleName) { Matcher.prototype.matches = function(element) { return element.type === this._elementType && - (!this._styleName || element.styleName === this._styleName) && - (!this._listIndex || isList(element, this._listIndex, this._listIsOrdered)); + (this._styleName === undefined || element.styleName === this._styleName) && + (this._listIndex === undefined || isList(element, this._listIndex, this._listIsOrdered)); } Matcher.prototype.orderedList = function(levelIndex) { |
