topicsRegex and synapsesRegex should allow commas (#1073)

This commit is contained in:
Devin Howard 2017-02-25 12:05:56 -08:00 committed by GitHub
parent 687b957737
commit 7840e09e5f

View file

@ -29,8 +29,8 @@ const Import = {
handleCSV: function(text, parserOpts = {}) {
const self = Import
const topicsRegex = /("?Topics"?)([\s\S]*)/mi
const synapsesRegex = /("?Synapses"?)([\s\S]*)/mi
const topicsRegex = /("?Topics"?,*)([\s\S]*)/mi
const synapsesRegex = /("?Synapses"?,*)([\s\S]*)/mi
let topicsText = text.match(topicsRegex) || ''
if (topicsText) topicsText = topicsText[2].replace(synapsesRegex, '')
let synapsesText = text.match(synapsesRegex) || ''