Skip to content

Commit

Permalink
preg_split on all line breaks in synonym post
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrik Nygren committed Jan 7, 2025
1 parent 463f9f6 commit 09cc82a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/classes/Feature/Search/Synonyms.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public function get_synonyms() {
$synonyms_raw = $this->get_synonyms_raw();
$synonyms = array_values(
array_filter(
array_map( [ $this, 'validate_synonym' ], explode( PHP_EOL, $synonyms_raw ) )
array_map( [ $this, 'validate_synonym' ], preg_split( '/\r\n|\r|\n/', $synonyms_raw ) )
)
);

Expand Down

0 comments on commit 09cc82a

Please sign in to comment.