Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite859ae5

Browse files
committed
add rtrim tabs incl. test
1 parentbd4a73a commite859ae5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

‎src/Symfony/Component/Finder/Gitignore.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static function toRegex(string $gitignoreFileContent): string
3131

3232
$res =self::lineToRegex('');
3333
foreach ($gitignoreLinesas$i =>$line) {
34-
$line =preg_replace('~(?<!\\\\)+$~','',$line);
34+
$line =preg_replace('~(?<!\\\\)[ \t]+$~','',$line);
3535

3636
if (0 ===strpos($line,'!')) {
3737
$line =substr($line,1);

‎src/Symfony/Component/Finder/Tests/GitignoreTest.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ public function provider(): array
117117
['','','a','a','a'],
118118
['','','a','a'],
119119
],
120+
[
121+
["\t","\t\\\t","\t\\\t","\t#","a\t#","a\t\t#","a\t#","a\t\t\\\t#","a\t\t\\\t\t#"],
122+
["\t\t","\t\t","a","a\t\t\t","a\t\t\t"],
123+
["\t","\t\t","\t\t","a\t","a","a\t","a\t\t"],
124+
],
120125
[
121126
[' a','b','\','c\'],
122127
[' a','b','','c'],

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp