twitter/typeahead.js — pull request #732 by sandstrom (2014-03-03 20:05:26+00:00)
Title: Pass `query` to suggestion template

I'm open to other ways of passing the query, should you prefer. It's currently included implicitly, as part of the parent scope, but could be passed into `getSuggestionNode` explicitly to, for clarity.

Useful for:
- Customizing suggestion based on query, e.g. to dig out the matched substring from a long string, to highlight.
- To make a 'fake' empty suggestion (until–if god wills it–the empty template becomes selectable): https://github.com/twitter/typeahead.js/issues/520#issuecomment-36548282