Skip to content

Add support for string operands in binary operations#773

Merged
ebussieres merged 8 commits into
PebbleTemplates:masterfrom
dashtinejad:string-in-binary-operators
Mar 1, 2026
Merged

Add support for string operands in binary operations#773
ebussieres merged 8 commits into
PebbleTemplates:masterfrom
dashtinejad:string-in-binary-operators

Conversation

@dashtinejad

Copy link
Copy Markdown
Contributor

Extended wideningConversionBinaryOperation to accept string operands in addition to numeric types.

Some samples:

{{ 10 - "2" }}
{# 8 #}

{{ 10 / "2" }}
{# 5 #}

{{ 10 * "2" }}
{# 20 #}

Previously Pebble throws error in these cases.

@dashtinejad dashtinejad marked this pull request as draft February 15, 2026 22:14
@dashtinejad dashtinejad marked this pull request as ready for review February 17, 2026 18:56
@ebussieres ebussieres force-pushed the string-in-binary-operators branch from aec89c9 to fa31632 Compare February 18, 2026 17:14
@dashtinejad

Copy link
Copy Markdown
Contributor Author

@ebussieres Ready for your review.

@ebussieres ebussieres force-pushed the string-in-binary-operators branch from aab9bf7 to 86dce1d Compare February 23, 2026 22:29
@dashtinejad

Copy link
Copy Markdown
Contributor Author

@ebussieres Hello. What do you think? Is this ready to merge, or do you have any feedback or suggestions?

@ebussieres ebussieres force-pushed the string-in-binary-operators branch from 86dce1d to 45bcb46 Compare February 27, 2026 21:03
@ebussieres ebussieres added this to the 4.1.2 milestone Mar 1, 2026
@ebussieres ebussieres merged commit 5907db8 into PebbleTemplates:master Mar 1, 2026
3 checks passed
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.

2 participants