Skip to content

Commit fca58ae

Browse files
fix(gtfsplus): trim extra spaces from fields
1 parent 36e854c commit fca58ae

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/gtfsplus/reducers/gtfsplus.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import update from 'react-addons-update'
44

55
import {constructNewGtfsPlusRow} from '../util'
6-
76
import type {Action} from '../../types/actions'
87
import type {GtfsPlusReducerState} from '../../types/reducers'
98

@@ -58,7 +57,7 @@ const gtfsplus = (
5857
continue
5958
}
6059
const fields = lines[0].split(',')
61-
const COLUMN_REGEX = /,(?=(?:(?:[^"]*"){2})*[^"]*$)/
60+
const COLUMN_REGEX = / *, *(?=(?:(?:[^"]*"){2})*[^"]*$)/
6261
const tableName = filename.split('.')[0]
6362
newTableData[tableName] = lines.slice(1)
6463
// Do not include blank lines (e.g., at the end of the file).

0 commit comments

Comments
 (0)