fix: allow multiple consecutive new lines
This commit is contained in:
parent
fa30094e61
commit
423dbdd457
1 changed files with 3 additions and 3 deletions
|
|
@ -266,8 +266,8 @@ const TUIChat: React.FC<TUIChatProps> = ({
|
||||||
</Text>
|
</Text>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// Regular line
|
// Regular line - ensure empty lines still render
|
||||||
return <Text key={lineIndex}>{line}</Text>;
|
return <Text key={lineIndex}>{line || " "}</Text>;
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
@ -277,7 +277,7 @@ const TUIChat: React.FC<TUIChatProps> = ({
|
||||||
return (
|
return (
|
||||||
<Box flexDirection="column">
|
<Box flexDirection="column">
|
||||||
{inputText.split("\n").map((line, index) => (
|
{inputText.split("\n").map((line, index) => (
|
||||||
<Text key={index}>{line}</Text>
|
<Text key={index}>{line || " "}</Text>
|
||||||
))}
|
))}
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue