You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the search result excerpt, this shows up as "FooBar".
It looks like this also occurs between text nodes in any block level element. For instance, if a paragraph ends with "Foo" and the next one starts with "Bar", the excerpt is "FooBar".
Excerpts should respect line breaks/carriage returns and insert a space between elements.
The text was updated successfully, but these errors were encountered:
Thanks for bringing this up! Pagefind should indeed handle these elements better than it is now.
Excerpts should respect line breaks/carriage returns and insert a space between elements.
There's actually no semantic line break here for Pagefind to spot — the whitespace between HTML elements doesn't carry any meaning and is lost when parsing, so it's equivalent to <dt>Foo</dt><dd>Bar</dd>.
Instead, Pagefind categorizes the elements that should break text into sentences, and makes sure to separate them with spaces and periods if required. dt and dl haven't been categorized correctly, so are being treated as inline elements.
In this case, I'll add handling so that when indexing, the dt is followed by a : if not present, and the dd is followed by .. So indexing:
I use markdown to create
elements like so:
Which outputs:
In the search result excerpt, this shows up as "FooBar".
It looks like this also occurs between text nodes in any block level element. For instance, if a paragraph ends with "Foo" and the next one starts with "Bar", the excerpt is "FooBar".
Excerpts should respect line breaks/carriage returns and insert a space between elements.
The text was updated successfully, but these errors were encountered: