Skip to content

Commit

Permalink
Issue #7: Refactor input validation code
Browse files Browse the repository at this point in the history
When pasting content directly from a spreadsheet where the separator is \t, all lines are marked as invalid because of this separator
  • Loading branch information
veronikaslc committed Oct 19, 2020
1 parent 673ef66 commit e38ee1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guids-generator.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
if (!line) continue;

let info = line.trim()
.split(',')
.split(/[\t,]+/)
.map( (item) => (item.trim()) )
.filter( (item) => (item) );

Expand Down

1 comment on commit e38ee1a

@marta-
Copy link
Contributor

@marta- marta- commented on e38ee1a Oct 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also update binput's helper text: "...separated by ',' for one or more patients, ..." -> "...separated by commas or tabs, for one or more patients, ..."

Please sign in to comment.