even better import csv regexes
This commit is contained in:
parent
7840e09e5f
commit
9800cc27c6
1 changed files with 2 additions and 2 deletions
|
@ -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"?[, \t"]*)([\s\S]*)/mi
|
||||
const synapsesRegex = /("?Synapses"?[, \t"]*)([\s\S]*)/mi
|
||||
let topicsText = text.match(topicsRegex) || ''
|
||||
if (topicsText) topicsText = topicsText[2].replace(synapsesRegex, '')
|
||||
let synapsesText = text.match(synapsesRegex) || ''
|
||||
|
|
Loading…
Reference in a new issue