diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-12-31 14:21:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-31 14:21:50 -0500 |
commit | 889240311b4072021f3742345bc87118c5b3a3e1 (patch) | |
tree | 1fdf2b476092569549e2dbd0c88c5b45aea13a70 /ext/mixed/js/text-scanner.js | |
parent | 1b4ba1fb006a6e6dda7f19c797b204c43900df4a (diff) |
Improve tag scanning behaviour (#1189)
* Update include/exclude selectors for Display._definitionTextScanner
* Fix missing condition
Diffstat (limited to 'ext/mixed/js/text-scanner.js')
-rw-r--r-- | ext/mixed/js/text-scanner.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js index f0903370..daea6a6c 100644 --- a/ext/mixed/js/text-scanner.js +++ b/ext/mixed/js/text-scanner.js @@ -198,8 +198,10 @@ class TextScanner extends EventDispatcher { clonedTextSource.setEndOffset(length, layoutAwareScan); - if (this._excludeSelector !== null) { - this._constrainTextSource(clonedTextSource, this._includeSelector, this._excludeSelector, layoutAwareScan); + const includeSelector = this._includeSelector; + const excludeSelector = this._excludeSelector; + if (includeSelector !== null || excludeSelector !== null) { + this._constrainTextSource(clonedTextSource, includeSelector, excludeSelector, layoutAwareScan); } return clonedTextSource.text(); |