Skip to content

Commit

Permalink
Post Excerpt Block: Fix unexpected commas in certain site languages (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored Mar 20, 2023
1 parent 523a831 commit 6b0efef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/block-library/src/post-excerpt/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ export default function PostExcerptEditor( {
.split( '', excerptLength + numberOfSpaces )
.join( '' );
} else if ( wordCountType === 'characters_including_spaces' ) {
trimmedExcerpt = rawOrRenderedExcerpt.trim().split( '', excerptLength );
trimmedExcerpt = rawOrRenderedExcerpt
.trim()
.split( '', excerptLength )
.join( '' );
}

trimmedExcerpt = trimmedExcerpt + '...';
Expand Down

1 comment on commit 6b0efef

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 6b0efef.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4467602503
📝 Reported issues:

Please sign in to comment.