mirror of
https://github.com/atom/atom.git
synced 2026-02-07 13:14:55 -05:00
Skip leading space after colon in nak output
This was causing a spec to fail since the line text now had a leading space for all results since the separator before the line text is now ': ' instead of just ':'.
This commit is contained in:
@@ -164,9 +164,9 @@ class Project
|
||||
state = 'readingPath'
|
||||
path = null
|
||||
else
|
||||
colonIndex = line.indexOf(':')
|
||||
colonIndex = line.indexOf(': ')
|
||||
matchInfo = line.substring(0, colonIndex)
|
||||
lineText = line.substring(colonIndex + 1)
|
||||
lineText = line.substring(colonIndex + 2)
|
||||
readMatches(matchInfo, lineText)
|
||||
|
||||
readMatches = (matchInfo, lineText) ->
|
||||
@@ -176,7 +176,7 @@ class Project
|
||||
|
||||
for [column, length] in matchPositions
|
||||
range = new Range([row, column], [row, column + length])
|
||||
match = lineText.substr(column + 1, length)
|
||||
match = lineText.substr(column, length)
|
||||
iterator({path, range, match, lineText})
|
||||
|
||||
deferred = $.Deferred()
|
||||
|
||||
Reference in New Issue
Block a user