Our match() condition doesn't seem to work as expected when regex alternates with | are used. I think it's because we naively wrap the argument of match() with ^ and $ anchors, here: https://github.com/ontodev/valve.rs/blob/main/src/toolkit.rs#L2740. So match(/\S|\S.*\S/) becomes ^\S|\S.*\S$. The workaround is to wrap in parentheses: match(/(\S|\S.*\S)/). Maybe we should wrap in parentheses at line 2740?
Our
match()
condition doesn't seem to work as expected when regex alternates with|
are used. I think it's because we naively wrap the argument ofmatch()
with^
and$
anchors, here: https://github.com/ontodev/valve.rs/blob/main/src/toolkit.rs#L2740. Somatch(/\S|\S.*\S/)
becomes^\S|\S.*\S$
. The workaround is to wrap in parentheses:match(/(\S|\S.*\S)/)
. Maybe we should wrap in parentheses at line 2740?