Skip to content

Commit 76fb698

Browse files
Remove word boundaries from terms search
1 parent a5a059f commit 76fb698

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gp-templates/helper-functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ function map_glossary_entries_to_translation_originals( $translation, $glossary
178178
$glossary_entries_reference[ $term ][] = $id;
179179
}
180180

181-
$terms_search = '\b(';
181+
$terms_search = '(';
182182
foreach ( $glossary_entries_suffixes as $term => $suffixes ) {
183183
$terms_search .= preg_quote( $term, '/' );
184184

@@ -214,7 +214,7 @@ function map_glossary_entries_to_translation_originals( $translation, $glossary
214214

215215
// Remove the trailing |.
216216
$terms_search = substr( $terms_search, 0, -1 );
217-
$terms_search .= ')\b';
217+
$terms_search .= ')';
218218
}
219219

220220
// Split the singular string on glossary terms boundaries.

0 commit comments

Comments
 (0)