Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snippet docs don't match behaviour #895

Open
jazoom opened this issue Nov 30, 2022 · 2 comments
Open

Snippet docs don't match behaviour #895

jazoom opened this issue Nov 30, 2022 · 2 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@jazoom
Copy link

jazoom commented Nov 30, 2022

Description
From the docs:

It is possible to change the size of the snippeting by adding its character size in the attributesToSnippet parameter.
For example: "description:40".

The 40 value represents the number of characters (rounded down to always have full words) and not the number of words. Thus, the snippet string size is always equal to or lower than 40 characters.

But this seems to be incorrect. For me this is showing 40 words, not a max of 40 characters.

Expected behavior
What the docs suggest.

Current behavior
Exactly the opposite of what the docs suggest.

Environment (please complete the following information):
latest of each library

@bidoubiwa bidoubiwa added the support Question that may be answered by the support team label Dec 1, 2022
@oluademola
Copy link

Hello @jazoom

The documentation is inconsistent. You are correct, and that is the expected behavior. The size indeed indicates the number of words, and It behaves exactly like the attribute to crop.

Thank you for bringing this to our notice, and we are sorry for the inconvenience.

@bidoubiwa bidoubiwa added documentation Improvements or additions to documentation good first issue Good for newcomers and removed support Question that may be answered by the support team labels Dec 6, 2022
@bidoubiwa
Copy link
Contributor

The readme should be updated with the current behavior. Feel free to make a PR to fix it! No problem if you prefer not :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants