feat: Implement trim surrounding spaces

This commit is contained in:
BlakeNeko
2025-12-18 11:39:18 +08:00
parent e0ce4beb21
commit d480c586d0
+5
View File
@@ -70,6 +70,11 @@ function shouldAutoFormat(text, nodeInfo) {
export function formatPromptText(text) {
if (!text || text.trim().length === 0) return text;
// Trim surrounding spaces of the entire prompt if the setting is enabled
if (settingValues.trimSurroundingSpaces) {
text = text.trim();
}
// Split text into individual lines for processing
const lines = text.split('\n');
const formattedLines = [];