🐛 fix: Fix highlight trim
parent
ef5c03e3ac
commit
c701c9f429
File diff suppressed because one or more lines are too long
|
|
@ -78,7 +78,7 @@ const App = memo<AppProps>(({ parentId }) => {
|
|||
style={{ height: size?.height, width: handlePromptResize() }}
|
||||
>
|
||||
<SyntaxHighlighter language="prompt" options={options}>
|
||||
{prompt.trim()}
|
||||
{prompt}
|
||||
</SyntaxHighlighter>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -175,13 +175,13 @@ export const Converter = {
|
|||
let inBracket = false;
|
||||
for (let index = 0; index < string__.length; index++) {
|
||||
if (string__[index] === ',' && !inBracket) {
|
||||
array.push(string__.slice(start, index).trim());
|
||||
array.push(string__.slice(start, index));
|
||||
start = index + 1;
|
||||
} else if (bracketRegex.test(string__[index])) {
|
||||
inBracket = !inBracket;
|
||||
}
|
||||
}
|
||||
array.push(string__.slice(Math.max(0, start)).trim());
|
||||
array.push(string__.slice(Math.max(0, start)));
|
||||
return array;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue