term.js icon indicating copy to clipboard operation
term.js copied to clipboard

Strange line breaks on hyphens

Open jagill opened this issue 11 years ago • 2 comments

It seems like, on terminal prompts, term.js inserts a line break on the non-first last hyphen. That is, if there's one hyphen on the line, there is no break. If there are two, it breaks on the second. If there are three or more, it breaks on the last. It'll break dynamically as you are typing, but only as you type a character after the hyphen (in the picture attached, you need to type the b in a-b for it to break as a-<br>b

term js hyphen linebreak

jagill avatar Feb 07 '14 17:02 jagill

-1 This is due to your container being too small for the size of your terminal and causing the whitespace (non-breaking space) to wrap. Either shrink your columns, increase the container size, or try adding "white-space: nowrap;" to your .terminal style. You may also might try adding a style for:

.terminal > div > span {
    display: inline-block;
}

astephens25 avatar Apr 15 '14 18:04 astephens25

Thank you! This works great for me.

mingfang avatar Jan 22 '16 04:01 mingfang