aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content_scripts/link_hints.coffee2
-rw-r--r--tests/dom_tests/dom_tests.coffee4
2 files changed, 3 insertions, 3 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee
index fc95bcd8..a5be6c57 100644
--- a/content_scripts/link_hints.coffee
+++ b/content_scripts/link_hints.coffee
@@ -65,7 +65,7 @@ LinkHints =
# This allows us to exclude the text used for matching descendants from that used for matching their
# ancestors.
textLength = (el) -> el.element.textContent?.length ? 0
- elements = elements.sort (a,b) -> textLength(a) - textLength b
+ elements.sort (a,b) -> textLength(a) - textLength b
hintMarkers = (@createMarkerFor(el) for el in elements)
@getMarkerMatcher().fillInMarkers(hintMarkers)
diff --git a/tests/dom_tests/dom_tests.coffee b/tests/dom_tests/dom_tests.coffee
index bb09a0a8..7bc50c72 100644
--- a/tests/dom_tests/dom_tests.coffee
+++ b/tests/dom_tests/dom_tests.coffee
@@ -228,9 +228,9 @@ context "Filtered link hints",
hintMarkers = getHintMarkers()
assert.equal "1", hintMarkers[0].textContent.toLowerCase()
assert.equal "2", hintMarkers[1].textContent.toLowerCase()
- assert.equal "3", hintMarkers[2].textContent.toLowerCase()
+ assert.equal "3: a label", hintMarkers[2].textContent.toLowerCase()
assert.equal "4: a label", hintMarkers[3].textContent.toLowerCase()
- assert.equal "5: a label", hintMarkers[4].textContent.toLowerCase()
+ assert.equal "5", hintMarkers[4].textContent.toLowerCase()
context "Input focus",