0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(console): trim trailing spaces in app guide code sample (#3811)

This commit is contained in:
Darcy Ye 2023-05-05 11:54:15 +08:00 committed by GitHub
parent e57fc80bd4
commit cf1dd17dd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,9 +94,9 @@ function Guide({ app, isCompact, onClose }: Props) {
const [, language] = /language-(\w+)/.exec(String(className ?? '')) ?? [];
return language ? (
<CodeEditor isReadonly language={language} value={String(children)} />
<CodeEditor isReadonly language={language} value={String(children).trimEnd()} />
) : (
<code>{String(children)}</code>
<code>{String(children).trimEnd()}</code>
);
},
a: ({ children, ...props }) => (