Skip to content

Commit

Permalink
fix: handle keywords stemmer, fix #487
Browse files Browse the repository at this point in the history
  • Loading branch information
weareoutman committed Jan 20, 2025
1 parent f4e2a6d commit 23ba48d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe("parseDocument", () => {
{
pageTitle: "Hello World",
description: "Hello Description",
keywords: "Hello,Keywords",
keywords: "Hello, Keywords",
sections: [
{
title: "Hello World",
Expand Down
5 changes: 4 additions & 1 deletion docusaurus-search-local/src/server/utils/parseDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ export function parseDocument($: cheerio.Root): ParsedDocument {
const $pageTitle = $("article h1").first();
const pageTitle = $pageTitle.text();
const description = $("meta[name='description']").attr("content") || "";
const keywords = $("meta[name='keywords']").attr("content") || "";
const keywords = ($("meta[name='keywords']").attr("content") || "").replace(
/,/g,
", "
);

const sections: ParsedDocumentSection[] = [];
const breadcrumb: string[] = [];
Expand Down

0 comments on commit 23ba48d

Please # to comment.