Description
I do not know if its my own fault or if this is a bug... 🧐
I'm using the docsify (v4.12.2) search plugin. Some search terms don't deliver a result, not even a "No results!" is returned. When typing in the search field the Error "Uncaught TypeError: c is undefined" is logged in the web console for each typed character of the browser.
With other patterns a "No results!" is indeed returned. It would even be enough to add a character after the above used word to return a result.
And other words give the expected results.
My index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<link rel="stylesheet" href="node_modules/docsify-themeable/dist/css/theme-defaults.css" />
</head>
<body>
<div id="app"></div>
<script>
var lang = location.hash.match(/#\/(de|en)\//);
if (lang) {
document.documentElement.setAttribute('lang', lang[1]);
}
window.$docsify = {
auto2top: true,
themeColor: '#be1a47',
name: 'Mandy Docs',
repo: '',
loadSidebar: true,
loadNavbar: true,
mergeNavbar: true,
maxLevel: 5,
subMaxLevel: 3,
alias: {
'/de/(.*)': '/de/$1',
'/en/(.*)': '/en/$1',
'/(.*)': '/en/$1',
},
search: {
paths: 'auto',
noData: {
'/de/': 'Keine Ergebnisse!',
'/en/': 'No results!',
'/': 'No results!',
},
placeholder: {
'/de/': 'Suche',
'/en/': 'Search',
'/': 'Search',
},
hideOtherSidebarContent: true,
pathNamespaces: ['/en', '/de'],
},
nameLink: {
'/en/': '#/en/',
'/de/': '#/de/',
'/': '#/en/',
},
};
</script>
<script src="node_modules/docsify/lib/docsify.min.js"></script>
<script src="node_modules/docsify/lib/plugins/search.min.js"></script>
<script src="node_modules/docsify/lib/plugins/emoji.min.js"></script>
<script src="node_modules/docsify-copy-code/dist/docsify-copy-code.min.js"></script>
<script src="node_modules/docsify-pagination/dist/docsify-pagination.min.js"></script>
<script src="node_modules/docsify-themeable/dist/js/docsify-themeable.min.js"></script>
</body>
</html>
My folder structure looks like:
📦docs
┣ 📂de
┃ ┣ 📂folder
┃ ┃ ┣ 📜file.md
┃ ┃ ┣ 📜file.md
┃ ┣ 📂folder
┃ ┃ ┣ 📜file.md
┃ ┃ ┣ 📜file.md
┃ ┣ 📜CHANGELOG.md
┃ ┣ 📜README.md
┃ ┣ 📜_navbar.md
┃ ┗ 📜_sidebar.md
┣ 📂en
┃ ┣ 📂folder
┃ ┃ ┣ 📜file.md
┃ ┃ ┣ 📜file.md
┃ ┣ 📂folder
┃ ┃ ┣ 📜file.md
┃ ┃ ┣ 📜file.md
┃ ┣ 📜CHANGELOG.md
┃ ┣ 📜README.md
┃ ┣ 📜_navbar.md
┃ ┗ 📜_sidebar.md
┣ 📂node_modules
┣ ...
┣ 📜favicon.ico
┣ 📜index.html
┣ 📜package-lock.json
┗ 📜package.json
Example Repo here:
https://github.com/LuGrInaut/docsify-search-not-working
I already searched the GitHub Issues for topics regarding the search topic but I'm not sure if this has something to do with the Indexes in the Local Browser Storage or with something else.
Thanks,
Lukas