Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapse 3+ spaces into middle ellipsis #158198

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,12 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
commandMap.add(executingCommand);
}
function formatLabel(label: string) {
return label.replace(/\r?\n/g, '\u23CE');
return label
// Replace new lines with "enter" symbol
.replace(/\r?\n/g, '\u23CE')
// Replace 3 or more spaces with midline horizontal ellipsis which looks similar
// to whitespace in the editor
.replace(/\s\s\s+/g, '\u22EF');
}
if (commands && commands.length > 0) {
for (const entry of commands) {
Expand Down