Create a new core plugin allowing to mark bookmarks to read them later.
When enabled:
* checkbox is displayed in editlink view for new bookmarks
* a plugin setting is available to check it or not it by default
* in bookmark list:
* new global filter to display only bookmark flagged as read it
later
* for each bookmarks, new action icon to toggle read it later status
* for each « readitlater » bookmark, red label « To Read » added,
and red line on the right of the bookmark added (default template)
Fixes#143
Signed-off-by: ArthurHoaro <arthur@hoa.ro>
A new plugin hook has been added: hook_test_filter_search_entry
This hook allows to filter out bookmark with custom plugin code when a search is performed.
Related to #143
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
Parameters typing and using strict types overall increase the codebase
quality by enforcing the a given parameter will have the expected type.
It also removes the need to unnecessary unit tests checking methods
behavior with invalid input.