diff --git a/src/current/utils/sourceMaterial.js b/src/current/utils/sourceMaterial.js index 438d7e9cc4..4cc72abd01 100644 --- a/src/current/utils/sourceMaterial.js +++ b/src/current/utils/sourceMaterial.js @@ -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);