From 9ef8555ad298668bcb8537ccdd2ab6560f44177f Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 19 Jan 2021 17:49:19 +0100 Subject: Support search highlights when matching URL content DefaultFormatter: - format 'a' tag content and not href attribute - format hashtags properly Markdown(Extra)Formatter: - Extend Parsedown to format highlight properly: https://github.com/erusev/parsedown/wiki/Tutorial:-Create-Extensions Fixes #1681 --- application/front/controller/visitor/BookmarkListController.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'application/front/controller/visitor/BookmarkListController.php') diff --git a/application/front/controller/visitor/BookmarkListController.php b/application/front/controller/visitor/BookmarkListController.php index fe8231be..106440b6 100644 --- a/application/front/controller/visitor/BookmarkListController.php +++ b/application/front/controller/visitor/BookmarkListController.php @@ -33,6 +33,7 @@ class BookmarkListController extends ShaarliVisitorController $formatter = $this->container->formatterFactory->getFormatter(); $formatter->addContextData('base_path', $this->container->basePath); + $formatter->addContextData('index_url', index_url($this->container->environment)); $searchTags = normalize_spaces($request->getParam('searchtags') ?? ''); $searchTerm = escape(normalize_spaces($request->getParam('searchterm') ?? '')); @@ -157,6 +158,7 @@ class BookmarkListController extends ShaarliVisitorController $formatter = $this->container->formatterFactory->getFormatter(); $formatter->addContextData('base_path', $this->container->basePath); + $formatter->addContextData('index_url', index_url($this->container->environment)); $data = array_merge( $this->initializeTemplateVars(), -- cgit v1.2.3