Skip to content
This repository was archived by the owner on May 2, 2018. It is now read-only.

Commit 8bfabb2

Browse files
committed
improve the regexp
1 parent c940043 commit 8bfabb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/class-glossary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ public function related_post_meta( $related ) {
383383
* @return string
384384
*/
385385
public function search_string( $title ) {
386-
return '/((?i)' . $title . '(?-i))(?![^<]*(<\/a>|<\/span>|" \/>))/';
386+
return '/((?i)' . $title . '(?-i))(?=[ \.\,\:\;\*\"\'\)\!\?\/\%\$\£\|\^\<\>])(?![^<]*(<\/a>|<\/span>|" \/>|>))/';
387387
}
388388

389389
/**

0 commit comments

Comments
 (0)