Skip to content

Commit

Permalink
fix(utils): fix word boundaries position
Browse files Browse the repository at this point in the history
  • Loading branch information
rhahao committed Dec 13, 2023
1 parent 17bc33c commit bb81986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/current/utils/sourceMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const checkAYFExplainingBeliefsAssignment = (source) => {
const boundary = '(?:^|\\s|$)';
const talk = t('talk', { lng: Setting.source_lang, ns: 'source' });
const demonstration = t('demonstration', { lng: Setting.source_lang, ns: 'source' });
const searchKey = boundary + `${talk}|${demonstration}` + boundary;
const searchKey = `${boundary}${talk}|${boundary}${demonstration}`;
const regex = new RegExp(searchKey, 'i');
const result = source.match(regex);

Expand Down

0 comments on commit bb81986

Please sign in to comment.