Opened 18 years ago
Closed 18 years ago
#3963 closed (wontfix)
[patch] Add optional replacement for truncate filters
Reported by: | 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)
Change History (7)
by , 18 years ago
Attachment: | truncate_optional_replacement.patch added |
---|
comment:1 by , 18 years ago
Needs tests: | set |
---|---|
Triage Stage: | Unreviewed → Design decision needed |
comment:2 by , 18 years ago
Patch needs improvement: | set |
---|
by , 18 years ago
Attachment: | truncate_optional_replacement_v2.patch added |
---|
updated patch which fixes issues mentioned earlier
by , 18 years ago
Attachment: | truncate_optional_replacement_v2_tests.patch added |
---|
test cases for latest patch (v2)
comment:3 by , 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 , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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.
Please disregard this patch; i made a mistake and assumed that arg would be a string. Updated patch and test case will arrive shortly..