MyShaarli/application/formatter
ArthurHoaro 4e3875c0ce Feature: highlight fulltext search results
How it works:

  1. when a fulltext search is made, Shaarli looks for the first
occurence position of every term matching the search. No change here,
but we store these positions in an array, in Bookmark's additionalContent.
  2. when formatting bookmarks (through BookmarkFormatter
implementation):
    1. first we insert specific tokens at every search result positions
    2. we format the content (escape HTML, apply markdown, etc.)
    3. as a last step, we replace our token with displayable span
elements

Cons: this tightens coupling between search filters and formatters
Pros: it was absolutely necessary not to perform the
search twice. this solution has close to no impact on performances.

Fixes #205
2020-10-16 20:31:12 +02:00
..
BookmarkDefaultFormatter.php Feature: highlight fulltext search results 2020-10-16 20:31:12 +02:00
BookmarkFormatter.php Feature: highlight fulltext search results 2020-10-16 20:31:12 +02:00
BookmarkMarkdownExtraFormatter.php Add Markdown Extra formatter 2020-10-13 12:20:34 +02:00
BookmarkMarkdownFormatter.php Feature: highlight fulltext search results 2020-10-16 20:31:12 +02:00
BookmarkRawFormatter.php Introduce Bookmark object and Service layer to retrieve them 2020-01-17 18:42:11 +01:00
FormatterFactory.php Better support for notes permalink 2020-07-28 20:46:11 +02:00