Skip to content

Commit

Permalink
add support for stress as search type
Browse files Browse the repository at this point in the history
  • Loading branch information
dhowe committed Apr 27, 2024
1 parent 40e48d2 commit 8cf863e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lexicon.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ class Lexicon {
}
regex = opts.regex; // do we have regex in opts?
if (typeof regex === 'string') {
if (opts && opts.type === 'stresses') {
if (opts && /^stress(es)?$/.test(opts.type)) {
if (/^\^?[01]+\$?$/.test(regex)) {
regex = regex.replace(/([01])(?=([01]))/g, "$1/");
}
Expand Down

0 comments on commit 8cf863e

Please sign in to comment.