From 7840e09e5fa532a0d93ccdffe48478cbfee5100c Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sat, 25 Feb 2017 12:05:56 -0800 Subject: [PATCH] topicsRegex and synapsesRegex should allow commas (#1073) --- frontend/src/Metamaps/Import.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/Metamaps/Import.js b/frontend/src/Metamaps/Import.js index a7aae5ae..90ed59d3 100644 --- a/frontend/src/Metamaps/Import.js +++ b/frontend/src/Metamaps/Import.js @@ -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) || ''