From 53514e5d5d970acc584f51d3345839a2e3304713 Mon Sep 17 00:00:00 2001 From: Erik Bernhardson Date: Tue, 18 Apr 2017 14:03:23 -0700 Subject: [PATCH] Allow editors to exclude navigation items from search indices When you perform a particular search, the results can be polluted by navigation elements that are not supposed to be displayed. This gives editors the ability to mark sections of the document that should not be indexed. Bug: T162905 Change-Id: Iab2b83c3778cd5f7f44736c0da569fd938ae2968 --- includes/content/WikiTextStructure.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/content/WikiTextStructure.php b/includes/content/WikiTextStructure.php index 9f79aa8d08..afa03b8f14 100644 --- a/includes/content/WikiTextStructure.php +++ b/includes/content/WikiTextStructure.php @@ -37,6 +37,9 @@ class WikiTextStructure { 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', // Collapsed fields are hidden by default so we don't want them showing up. '.autocollapse', + // Content explicitly decided to be not searchable by editors such + // as custom navigation templates. + '.navigation-not-searchable' ]; /** -- 2.20.1