Skip to content

Commit 250dcc5

Browse files
fix: show actual commit message with emojis in preview
• Preview now displays exact commit message as stored in Git • Removed emoji stripping from preview display logic • Users can see emojis even if terminal doesn't support display • Ensures preview accurately reflects Git/GitHub commit message • Fixes issue where emojis were hidden on non-emoji terminals
1 parent 597d67e commit 250dcc5

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
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: show actual commit message with emojis in preview
6+
7+
- Preview now displays the exact commit message as it will be stored in Git
8+
- Removed emoji stripping from preview display logic
9+
- Users can see emojis even if terminal doesn't support emoji display
10+
- Ensures preview accurately reflects what will be committed to Git/GitHub
11+
- Fixes issue where emojis were hidden in preview on non-emoji terminals
12+

src/cli/commands/commit/prompts.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,12 +1085,11 @@ export async function displayPreview(
10851085
| "edit-body"
10861086
| "cancel"
10871087
> {
1088-
// Import emoji utilities
1089-
const { formatForDisplay } = await import("../../../lib/util/emoji.js");
1090-
1091-
// Strip emojis for display if terminal doesn't support them
1092-
const displayMessage = formatForDisplay(formattedMessage, emojiModeActive);
1093-
const displayBody = body ? formatForDisplay(body, emojiModeActive) : undefined;
1088+
// Preview shows the actual commit message as it will be stored in Git
1089+
// We don't strip emojis here because the user needs to see what will be committed
1090+
// even if their terminal doesn't support emoji display
1091+
const displayMessage = formattedMessage;
1092+
const displayBody = body;
10941093

10951094
// Start connector line using @clack/prompts
10961095
log.info(

0 commit comments

Comments
 (0)