Skip to content

Commit 7e62f42

Browse files
committed
fix: changed regex to support genes with square brackets at the end
e.g. CELE_F49C12.2 ( WBGene00009872 ) [CELE_F49C12.2]
1 parent feecec1 commit 7e62f42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/frontend/curator_dashboard/src/AFPValues.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function extractEntitiesFromTfpString(entitiesString, prefix) {
8787
* @returns {string} a string containing the list of entities in AFP format, ready to be stored in the DB
8888
*/
8989
export function transformEntitiesIntoAfpString(entitiesList, prefix) {
90-
const addInfoRegex = / \( ([^ ]+) \)$/;
90+
const addInfoRegex = / \( ([^ ]+) \)( \[[^ ]+\])?$/;
9191
let entity;
9292
let addInfo = "";
9393
let results = [];

src/frontend/feedback_form/src/AFPValues.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function extractEntitiesFromTfpString(entitiesString, prefix) {
8787
* @returns {string} a string containing the list of entities in AFP format, ready to be stored in the DB
8888
*/
8989
export function transformEntitiesIntoAfpString(entitiesList, prefix) {
90-
const addInfoRegex = / \( ([^ ]+) \)$/;
90+
const addInfoRegex = / \( ([^ ]+) \)( \[[^ ]+\])?$/;
9191
let entity;
9292
let addInfo = "";
9393
let results = [];

0 commit comments

Comments
 (0)