keep leading whitespace
MODIFY
lib/project/match-view.js
lib/project/match-view.js
@@ -45,7 +45,7 @@ class MatchView {
const range = Range.fromObject(this.match.range);
const matchStart = range.start.column - this.match.lineTextOffset;
const matchEnd = range.end.column - this.match.lineTextOffset;
- const prefix = this.match.lineText.slice(0, matchStart).trimLeft();
+ const prefix = this.match.lineText.slice(0, matchStart);
const suffix = this.match.lineText.slice(matchEnd);
const {leadingContextLines, trailingContextLines} = this.match;
@@ -75,7 +75,7 @@ class MatchView {
index >= leadingContextLines.length - this.leadingContextLineCount ?
$.li({className: 'list-item'},
$.span({className: 'line-number text-subtle'}, range.start.row + 1 - leadingContextLines.length + index),
- $.span({className: 'preview'}, $.span({}, line.trimLeft()))
+ $.span({className: 'preview'}, $.span({}, line))
) : null
) : null,
@@ -100,7 +100,7 @@ class MatchView {
index < this.trailingContextLineCount ?
$.li({className: 'list-item'},
$.span({className: 'line-number text-subtle'}, range.end.row + 1 + index + 1),
- $.span({className: 'preview'}, $.span({}, line.trimLeft()))
+ $.span({className: 'preview'}, $.span({}, line))
) : null
) : null
)

MODIFY
styles/find-and-replace.less
styles/find-and-replace.less
@@ -293,6 +293,7 @@ atom-workspace.find-visible {
.preview {
word-break: break-all;
font-family: monospace;
+ white-space: pre;
}
.selected {

keep leading whitespace