Skip to content

Add support for multiple pipes in placeholder modifiers#17

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/add-multiple-pipes-support
Draft

Add support for multiple pipes in placeholder modifiers#17
Copilot wants to merge 5 commits intomainfrom
copilot/add-multiple-pipes-support

Conversation

Copy link
Contributor

Copilot AI commented Feb 7, 2026

  • Explore codebase structure and understand current implementation
  • Modify PlaceholderFormatter regex to support multiple pipes separated by |
  • Update processPlaceholder to split pipes and apply them sequentially
  • Create comprehensive tests for multiple pipes functionality
  • Test escaped pipes (\|) are treated as arguments not separators
  • Add documentation for the new feature
  • Verify implementation with manual integration tests
  • Run code review (1 comment - verified regex pattern is correct)
  • Run security checks (passed - no issues detected)
  • Update docs/modifiers/Modifiers.md with multiple pipes documentation
Original prompt

This section details on the original issue you should resolve

<issue_title>Add support for multiple pipes in placeholder modifiers</issue_title>
<issue_description>At the moment, we can only have 1 pipe modifying the value of a placeholder (e.g. {{placeholder|trans}}). But we could enable support for adding multiple pipes to a placeholder.

{{placeholder|trans|quote}}

It will probably not be possible to combine all placeholders, but it's interesting feature for us to have. If we consider the possibility of #8, we should make sure that we can still use | as an argument of a modifier, as long as it's escaped (\|),</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 7, 2026 09:03
- Modified PlaceholderFormatter to split pipe string by unescaped | characters
- Each modifier is applied sequentially in order
- Added test cases for multiple pipes functionality
- Supports escaped pipes (\|) as arguments within modifiers

Co-authored-by: henriquemoody <154023+henriquemoody@users.noreply.github.com>
- Changed test cases from quote to actual formatters (date, pattern, mask, number)
- These modifiers are actually available in the default chain
- Tests demonstrate multiple pipes with realistic formatter combinations

Co-authored-by: henriquemoody <154023+henriquemoody@users.noreply.github.com>
- Documented multiple pipes syntax and usage in PlaceholderFormatter.md
- Added examples showing chained modifiers
- Explained escaped pipes (\|) behavior
- Updated template syntax rules

Co-authored-by: henriquemoody <154023+henriquemoody@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for multiple pipes in placeholder modifiers Add support for multiple pipes in placeholder modifiers Feb 7, 2026
Copilot AI requested a review from henriquemoody February 7, 2026 09:09
Copy link
Member

@henriquemoody henriquemoody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great changes!

Now make sure docs/modifiers/Modifiers.md is up-to-date as well

- Added "Chaining Multiple Modifiers" section
- Included examples showing multiple pipes usage
- Explained escaped pipe behavior
- Documented sequential left-to-right application

Co-authored-by: henriquemoody <154023+henriquemoody@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 7, 2026

Great changes!

Now make sure docs/modifiers/Modifiers.md is up-to-date as well

Updated! Added a "Chaining Multiple Modifiers" section to docs/modifiers/Modifiers.md with examples and explanation of the sequential application behavior. (d8fb54c)

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

Successfully merging this pull request may close these issues.

Add support for multiple pipes in placeholder modifiers

2 participants