Build: trim whitespace from search index

This commit is contained in:
Ben Edgington
2025-06-27 10:09:57 +01:00
parent 0168ec1899
commit 85b2024b24

View File

@@ -54,7 +54,7 @@ function getChunks(tree, chunkTypes, exclude) {
for (let idx = 0; idx < chunkTypes.length; idx++) {
const type = chunkTypes[idx];
if (matches(type.query, node)) {
const text = getText(node, exclude);
const text = getText(node, exclude).trim();
if (text !== '') {
const tagName = node.tagName.toLowerCase();
let id = node.properties?.id;