Extract hint tags from <button> text

This is useful for some styled buttons, including some of those found on
GitHub.
This commit is contained in:
Niklas Haas 2016-08-08 17:49:35 +02:00
parent cf26201e86
commit 6e279f1b1e
No known key found for this signature in database
GPG Key ID: 9A09076581B27402

View File

@ -1030,7 +1030,8 @@ class WordHinter:
extractable_attrs = collections.defaultdict(list, {
"img": ["alt", "title", "src"],
"a": ["title", "href", "text"],
"input": ["name", "placeholder"]
"input": ["name", "placeholder"],
"button": ["text"]
})
return (attr_extractors[attr](elem)