feat: supports the display of line breaks in Markdown

This commit is contained in:
RugerMc
2023-03-29 17:19:30 +08:00
parent cfbe6d77b5
commit b94607f636
6 changed files with 8 additions and 5 deletions

View File

@@ -128,7 +128,7 @@ function useSubmitHandler() {
const shouldSubmit = (e: KeyboardEvent) => {
if (e.key !== "Enter") return false;
return (
(config.submitKey === SubmitKey.AltEnter && e.altKey) ||
(config.submitKey === SubmitKey.CtrlEnter && e.ctrlKey) ||

View File

@@ -34,6 +34,7 @@ export function Markdown(props: { content: string }) {
components={{
pre: PreCode,
}}
className="line-break"
>
{props.content}
</ReactMarkdown>