removed trim for clip preview

This commit is contained in:
Sergey Kurdin 2025-01-18 14:27:21 -05:00
parent f4928f463a
commit 1fa0a9c7dd

View File

@ -190,9 +190,7 @@ export function getValuePreview(
if (!value || isLargeView) {
return {
valuePreview:
isImageData && value
? value.substring(0, 200) + '...'
: value || 'No content',
isImageData && value ? value.substring(0, 200) + '...' : value || 'No content',
morePreviewLines: null,
morePreviewChars: null,
}
@ -222,20 +220,19 @@ export function getValuePreview(
morePreviewChars: morePreviewChars > 0 ? morePreviewChars : null,
}
} else {
const preview = normalizedValue.trim()
const previewLines = preview.split('\n')
const previewLines = normalizedValue.split('\n')
const morePreviewLines = normalizedValue.split('\n').length - previewLines.length
if (isImageData) {
return {
valuePreview: preview.substring(0, 60) + '...',
valuePreview: normalizedValue.substring(0, 60) + '...',
morePreviewLines: null,
morePreviewChars: null,
}
}
return {
valuePreview: preview,
valuePreview: normalizedValue,
morePreviewLines: morePreviewLines > 0 ? morePreviewLines : null,
morePreviewChars: null,
}