Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/for-template-authors/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,14 @@ Always validate your JSON before using it with Templify:

### Double-Check Placeholder Names

**Case-sensitive matching:**
**JSON keys are case-sensitive:**
- Template: `{{CustomerName}}`
- JSON: `"CustomerName"` ✅
- JSON: `"customername"` ❌
- JSON: `"customer_name"` ❌

Always match the exact case from your JSON data.

### Verify Closing Tags

Every opening tag needs a closing tag:
Expand Down
8 changes: 7 additions & 1 deletion docs/for-template-authors/placeholders.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,9 @@ Empty strings are replaced with nothing (empty text).

### Case Sensitivity

Remember that placeholder names are case-sensitive:
Placeholder name matching depends on your data structure:

**Dictionary keys (JSON) are case-sensitive:**

**JSON:**
```json
Expand All @@ -435,6 +437,10 @@ Remember that placeholder names are case-sensitive:
{{customername}} → {{customername}} (not found!)
```

**Note for developers:** If your data comes from code (not JSON files), property names may be case-insensitive depending on how the data is structured.

**Best practice for template authors:** Always match the exact case used in your JSON keys to avoid confusion and ensure templates work reliably.

## Formatting Placeholders

You can apply formatting to placeholders using format specifiers:
Expand Down
2 changes: 1 addition & 1 deletion docs/for-template-authors/template-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Second user: {{Users[1].Name}}, age {{Users[1].Age}}

### Case Sensitivity

Placeholder names are **case-sensitive**. `{{Name}}` and `{{name}}` are different.
JSON keys are **case-sensitive**. `{{Name}}` and `{{name}}` are different. Always match the exact case used in your JSON data.

---

Expand Down