Skip to content

Commit

Permalink
Update regex for splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
pverscha committed Feb 17, 2021
1 parent cc1d95f commit 7b75856
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion web/src/components/GoInputComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</v-textarea>
<div>
<span style="float: left;">Or <a @click="selectFile" :class="disabled ? 'disabled' : ''">upload a file</a> directly</span>
<span style="float: right;">{{ this.contents ? this.contents.trimEnd().split("\r?\n").length : 0 }} GO terms in sample</span>
<span style="float: right;">{{ this.contents ? this.contents.trimEnd().split(/\r?\n/).length : 0 }} GO terms in sample</span>
</div>
<input type="file" ref="fileUploader" accept="text/plain, .csv" style="display:none">
</div>
Expand Down
8 changes: 4 additions & 4 deletions web/src/views/Analyze.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,21 @@ export default class Analyse extends Vue {
private errorVisible = false;
private created() {
this.goList1 = this.$store.getters.goList1.join("\r?\n");
this.goList2 = this.$store.getters.goList2.join("\r?\n");
this.goList1 = this.$store.getters.goList1.join(/\r?\n/);
this.goList2 = this.$store.getters.goList2.join(/\r?\n/);
}
@Watch("goList1")
private onGoList1Changed(newValue: string, oldValue: string) {
if (oldValue !== newValue) {
this.$store.dispatch("updateGoList1", newValue.trimEnd().split("\r?\n"));
this.$store.dispatch("updateGoList1", newValue.trimEnd().split(/\r?\n/));
}
}
@Watch("goList2")
private onGoList2Changed(newValue: string, oldValue: string) {
if (oldValue !== newValue) {
this.$store.dispatch("updateGoList2", newValue.trimEnd().split("\r?\n"));
this.$store.dispatch("updateGoList2", newValue.trimEnd().split(/\r?\n/));
}
}
Expand Down

0 comments on commit 7b75856

Please sign in to comment.