63b7fb6d8982a8aeec3b0de4fa10fe2be796ab26 |
|
12-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Refactor the way results are passed to filters, highlighters, and formatters. [Fixes #2529522]
Previously, result filters received an array of raw results,
highlighters received an array of text result strings, and formatters
received several arrays containing different result formats.
This commit changes this behavior: filters, highlighters, and formatters
now all receive a single array of result objects. Each object has
several properties (display, highlighted, raw, text) representing the
various formats of a given result.
Filters are expected to return an array of result objects. Highlighters
should return an array of highlighted result text strings. Formatters
should return an array of HTML strings or Node instances. |