Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah German <sgerman@gitlab.com>2022-09-22 18:10:42 +0300
committerKati Paizee <kpaizee@gitlab.com>2022-09-22 18:10:42 +0300
commit6ef828e917f82a7bd8a621c8a652e3127666ac37 (patch)
tree62b2f8c2f54d46bda3a58e8c45b1cad2e9777514 /scripts
parenta5ac9d88bd1251c252d53680e8af0df0eef1d743 (diff)
Add Lunr search UI components
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lunr/preindex.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lunr/preindex.js b/scripts/lunr/preindex.js
index ffae7d8c..b883d9a0 100644
--- a/scripts/lunr/preindex.js
+++ b/scripts/lunr/preindex.js
@@ -5,8 +5,8 @@
* Creates data files required for Lunr search.
*
* This script creates two JSON files:
- * - lunr-index.js: A serialized search index.
- * - lunr-map.js: Maps index item IDs to their human-readable titles.
+ * - lunr-index.json: A serialized search index.
+ * - lunr-map.json: Maps index item IDs to their human-readable titles.
*
* @see https://lunrjs.com/guides/index_prebuilding.html
*/
@@ -68,7 +68,7 @@ buildIndex(htmlSrc, (err, filenames) => {
if (title.length) {
pages.push({
id: filename.slice(htmlSrc.length),
- h1: title,
+ h1: title.trim(),
h2: getText($, 'h2'),
h3: getText($, 'h3'),
});