Skip to content

fix(client): prevent word breaking in ShikiEditor#2448

Merged
antfu merged 1 commit into
slidevjs:mainfrom
maximou4391:feat/editor_word_break_strategy
Jan 28, 2026
Merged

fix(client): prevent word breaking in ShikiEditor#2448
antfu merged 1 commit into
slidevjs:mainfrom
maximou4391:feat/editor_word_break_strategy

Conversation

@maximou4391

@maximou4391 maximou4391 commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

Description

Changes the text wrapping behavior in ShikiEditor to preserve word integrity instead of breaking words mid-character.

Changes

  • Changed word-break: break-all to word-break: normal so words wrap at natural boundaries (spaces, hyphens)
  • Added overflow-wrap: break-word as a fallback for long unbreakable strings (e.g., URLs) to prevent horizontal overflow

Before

Words could be split at any character, making text harder to read:

This is a lon
g word that g
ets broken

After

Words wrap naturally to the next line:

This is a
long word
that gets
broken

@netlify

netlify Bot commented Jan 28, 2026

Copy link
Copy Markdown

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit 37a9218
🔍 Latest deploy log https://app.netlify.com/projects/slidev/deploys/6979de0543ff250008eb4696
😎 Deploy Preview https://deploy-preview-2448--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@antfu
antfu merged commit 645b2e4 into slidevjs:main Jan 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants