Skip to content

Commit

Permalink
fix: unnecessary trailing line break for read-only source code (#2033)
Browse files Browse the repository at this point in the history
* fix: trim

* fix: 兼容LiveDemo情况

---------

Co-authored-by: Peach <scdzwyxst@gmail.com>
  • Loading branch information
Zhou-Bill and PeachScript authored Mar 21, 2024
1 parent 19ebd41 commit 0156dff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/theme-default/builtins/SourceCode/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const SourceCode: FC<SourceCodeProps> = (props) => {
const code = (
<Highlight
{...defaultProps}
code={children}
code={props.textarea ? children : children.trim()}
language={SIMILAR_DSL[lang] || lang}
theme={undefined}
>
Expand Down

0 comments on commit 0156dff

Please sign in to comment.