[PR #230] [MERGED] fix: resolve link URL variables within repeat/loop items #457

Closed
opened 2026-03-15 02:15:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/arikchakma/maily.to/pull/230
Author: @toxin20
Created: 2/7/2026
Status: Merged
Merged: 2/7/2026
Merged by: @arikchakma

Base: mainHead: main


📝 Commits (1)

  • 616e462 fix bug so link URL variables in repeat items resolve correctly

📊 Changes

2 files changed (+50 additions, -1 deletions)

View changed files

📝 packages/render/src/maily.tsx (+1 -1)
📝 packages/render/src/render.test.ts (+49 -0)

📄 Description

I noticed that link URLs with variables weren't resolving correctly when used inside repeat blocks. The href would just stay as the raw variable reference instead of being replaced with the actual value from each item's payload.

The root cause: When rendering marks (like links) inside a repeat block, we weren't passing the render options through to the mark processor.

The fix is a one-liner: just forward options to the mark handler call. Added a test to make sure link URL variables inside repeat items resolve as expected.


Thanks for creating this tool btw! In our app, we're sending transactional mail via SMTP, and Maily really helps creating an effective workflow where we design templates -> save them as JSON -> render and interpolate them at runtime when sending mails.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/arikchakma/maily.to/pull/230 **Author:** [@toxin20](https://github.com/toxin20) **Created:** 2/7/2026 **Status:** ✅ Merged **Merged:** 2/7/2026 **Merged by:** [@arikchakma](https://github.com/arikchakma) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`616e462`](https://github.com/arikchakma/maily.to/commit/616e462081cf1ebf8b0e038f854e68159a433649) fix bug so link URL variables in repeat items resolve correctly ### 📊 Changes **2 files changed** (+50 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/render/src/maily.tsx` (+1 -1) 📝 `packages/render/src/render.test.ts` (+49 -0) </details> ### 📄 Description I noticed that link URLs with variables weren't resolving correctly when used inside repeat blocks. The href would just stay as the raw variable reference instead of being replaced with the actual value from each item's payload. The root cause: When rendering marks (like links) inside a repeat block, we weren't passing the render options through to the mark processor. The fix is a one-liner: just forward options to the mark handler call. Added a test to make sure link URL variables inside repeat items resolve as expected. -------- Thanks for creating this tool btw! In our app, we're sending transactional mail via SMTP, and Maily really helps creating an effective workflow where we design templates -> save them as JSON -> render and interpolate them at runtime when sending mails. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 02:15:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/maily.to#457
No description provided.