Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
Fixed showing content in single line in WP 6.5 (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
chandan-tudu authored May 2, 2024
1 parent 0826a0a commit 35dbb26
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ const save = ( { attributes } ) => {
<pre { ...blockProps }>
<RichText.Content
tagName="code"
value={ attributes.content }
value={
typeof attributes.content === 'string'
? attributes.content
: attributes.content.toHTMLString({
preserveWhiteSpace: true,
})
}
lang={ attributes.language }
className={ cls }
/>
Expand Down

0 comments on commit 35dbb26

Please sign in to comment.