Opened 18 years ago

Closed 18 years ago

#3963 closed (wontfix)

[patch] Add optional replacement for truncate filters

Reported by: Johan Bergström <bugs@…> Owned by: Adrian Holovaty
Component: Template system Version: dev
Severity: Keywords: truncate optional replacement
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This small patch adds support for an optional replacement when truncatewords or truncatewords_html is used. It defaults "..." for truncatewords, " ..." for truncatewords_html and returns input silently if comma should be used as a delimiter.

Attachments (3)

truncate_optional_replacement.patch (3.3 KB ) - added by bugs@… 18 years ago.
truncate_optional_replacement_v2.patch (3.3 KB ) - added by Johan Bergström <bugs@…> 18 years ago.
updated patch which fixes issues mentioned earlier
truncate_optional_replacement_v2_tests.patch (913 bytes ) - added by Johan Bergström <bugs@…> 18 years ago.
test cases for latest patch (v2)

Download all attachments as: .zip

Change History (7)

by bugs@…, 18 years ago

comment:1 by Gary Wilson <gary.wilson@…>, 18 years ago

Needs tests: set
Triage Stage: UnreviewedDesign decision needed

comment:2 by Johan Bergström <bugs@…>, 18 years ago

Patch needs improvement: set

Please disregard this patch; i made a mistake and assumed that arg would be a string. Updated patch and test case will arrive shortly..

by Johan Bergström <bugs@…>, 18 years ago

updated patch which fixes issues mentioned earlier

by Johan Bergström <bugs@…>, 18 years ago

test cases for latest patch (v2)

comment:3 by Johan Bergström <bugs@…>, 18 years ago

Needs tests: unset
Patch needs improvement: unset

Updated properties to better reflect ticket status. Is there anything else that needs to be done here?

comment:4 by Malcolm Tredinnick, 18 years ago

Resolution: wontfix
Status: newclosed

I really can't see that is widely useful. If there is a realy big reason why a particular project cannot use three dots as the continuation marker, it's trivial to write a custom version of the truncatewords filter.

Addding endless customisation options might seem like an easy thing to do, but it increases the maintenance burden and isn't always really scratching more than just an isolated itch. I think in this case, it's not worth including.

Note: See TracTickets for help on using tickets.
Back to Top