Skip to content

Commit 48bd866

Browse files
fix: include emoji placeholder in generated config template
• Add {emoji} placeholder to template in buildConfig function • Generated configs now include {emoji} in format.template field • Fixes issue where emojis didn't appear in commits when enabled • Template now matches default config structure with emoji support • Ensures formatCommitMessage can properly replace emoji placeholder
1 parent 250dcc5 commit 48bd866

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"@labcatr/labcommitr": patch
3+
---
4+
5+
fix: include emoji placeholder in generated config template
6+
7+
- Add {emoji} placeholder to template in buildConfig function
8+
- Generated configs now include {emoji} in format.template field
9+
- Fixes issue where emojis didn't appear in commits even when enabled
10+
- Template now matches default config structure with emoji support
11+
- Ensures formatCommitMessage can properly replace emoji placeholder
12+

src/lib/presets/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ export function buildConfig(
141141
force_emoji_detection: null,
142142
},
143143
format: {
144-
// Template is determined by style; emoji is handled at render time
145-
template: "{type}({scope}): {subject}",
144+
// Template includes {emoji} placeholder - will be replaced with emoji or empty string
145+
template: "{emoji}{type}({scope}): {subject}",
146146
subject_max_length: 50,
147147
// Body configuration (respects user choice, defaults to optional)
148148
body: {

0 commit comments

Comments
 (0)