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

Only date('format') filter in Summary String Transformations work. All others are broken. #7221

Open
mimecine opened this issue May 30, 2024 · 1 comment
Labels
type: bug code to address defects in shipped code

Comments

@mimecine
Copy link

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)

@mimecine mimecine added the type: bug code to address defects in shipped code label May 30, 2024
@mimecine
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

1 participant