diff --git a/src/components/CopyCommand.astro b/src/components/CopyCommand.astro index 5ebc343..9ddda27 100644 --- a/src/components/CopyCommand.astro +++ b/src/components/CopyCommand.astro @@ -6,12 +6,12 @@ interface Props { } const { command } = Astro.props; -// Each word is kept whole, so a long command wraps at spaces and never inside a package name or an option. +// A long command wraps at spaces. A word too long for the line, such as a package name on a phone, breaks after a dot. const words = command.split(' '); ---
- {words.map((w, i) => {i > 0 && ' '}{w})} + {words.map((w, i) => {i > 0 && ' '}{w.split('.').map((part, j) => {j > 0 && .}{part})})}