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

Fixed showing content in single line in WP 6.5 #138

Merged
merged 1 commit into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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