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

Adjustable max length #2

Open
markoa opened this issue Oct 19, 2011 · 1 comment
Open

Adjustable max length #2

markoa opened this issue Oct 19, 2011 · 1 comment

Comments

@markoa
Copy link
Member

markoa commented Oct 19, 2011

Steve rightfully says:

BTW, I noticed that the max-length calculation using the magic number 3 is no longer accurate/relevant, but I left it unchanged because it affects the overall behaviour. It's not easy to calculate the character length of the customisable "more" link because the string might contain "→" entities or suchlike. It would therefore really be best to remove the adjustment to max-length, and instead rely on users to adjust max length according to the "more" text they have configured.

@purcell
Copy link

purcell commented Oct 19, 2011

I think this is as simple as just removing the "- 3". I personally think it makes more sense for the maxLength option to correspond to the number of characters to which the original text is truncated, rather than the length of the truncated text plus that of the "more" link.

-Steve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants