decap-cms
decap-cms copied to clipboard
Only date('format') filter in Summary String Transformations work. All others are broken.
Describe the bug
The only filter that seems to work in the summary is the date one. All others are inert.
To Reproduce summary = "{{ title | upper }} / {{ title | lower }} / {{ title | truncate(3) }} / {{ nonexistant | default('Hello') }} / {{mytruth | ternary('Yep','Nope') }} / {{today | date('yyyy') }}" yields Title / Title / Title / / / 2024 Booleans don't display at all whether true or false (might be expected tho)
Expected behavior TITLE / title / Tit / Hello / Yep / 2024
Applicable Versions:
- Decap CMS version: 4.3.0
- Git provider: Github
- OS: MacOS latest
- Browser version: Chrome latest
Additional context Booleans don't display at all whether true or false (might be expected tho)
With further investigation, I realize that it's a matter of spaces, but only if it's written like {{var | filter}} not as {{var | filter }} <- note the space at the end.
The ternary filter is sensitive about spacing before an argument.
Chaining filters doesn't work.
Hi, is someone is working on it or should I take it.
@Tarun1406 are you working on this?
Sorry I think I can't i got a little busy in office work. Sorry
On Thu, Oct 17, 2024, 2:14 PM Martin Jagodic @.***> wrote:
@Tarun1406 https://github.com/Tarun1406 are you working on this?
— Reply to this email directly, view it on GitHub https://github.com/decaporg/decap-cms/issues/7221#issuecomment-2418929219, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUHKBKBYGCLAZUBKC26F4STZ352FRAVCNFSM6AAAAABIRBTSJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJYHEZDSMRRHE . You are receiving this because you were mentioned.Message ID: @.***>