flexsearch icon indicating copy to clipboard operation
flexsearch copied to clipboard

highlight boundary always produces preceding ellipsis

Open terpimost opened this issue 8 months ago • 1 comments

In the "flexsearch":"0.8.205" I'm observing an unexpected behavior. When setting highlight option I'm always having preceding ellipsis, while there is no content preceding it exist.

...
highlight: {
      template: "<mark>$1</mark>",
      merge: true,
      clip: false,
      boundary: { 
          before: 200,
          after: 100,
          total: 400
      }
  }

Image

You can see that the text is "Best of all, you can see it today", so there should be no ellipsis before or after.

terpimost avatar Jun 06 '25 21:06 terpimost

Hi @terpimost The issue was fixed in the latest version. Thanks for reporting. 🙌

ts-thomas avatar Sep 07 '25 08:09 ts-thomas