Skip to content

Commit 5fb8569

Browse files
committed
Use UTF-8 mode on regex.
1 parent 586bfbe commit 5fb8569

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

features/db-ack.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,11 +570,11 @@ Feature: Ack through the database
570570
When I run `wp db ack "かきくけこ" --before_context=2 --after_context=1`
571571
Then STDOUT should contain:
572572
"""
573-
:えおかきくけこさし
573+
:えおかきくけこさ
574574
"""
575575
And STDOUT should not contain:
576576
"""
577-
えおかきくけこさしす
577+
えおかきくけこさし
578578
"""
579579

580580
When I run `wp db ack "かきくけこ"`

src/DB_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ public function ack( $args, $assoc_args ) {
755755

756756
$esc_like_search = self::esc_like( $search );
757757
$safe_search = preg_quote( $search, '#' );
758-
$search_regex = '#(.{0,' . $before_context . '})(' . $safe_search .')(.{0,' . $after_context . '})#i';
758+
$search_regex = '#(.{0,' . $before_context . '})(' . $safe_search .')(.{0,' . $after_context . '})#ui';
759759

760760
$tables = WP_CLI\Utils\wp_get_table_names( $args, $assoc_args );
761761

0 commit comments

Comments
 (0)