Skip to content

Commit c732019

Browse files
upgrade filepath (#959)
* upgrade filepath * upgrade filepath * fix * fix test
1 parent 7225fbc commit c732019

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

plugin/action/hash/normalize/token_normalizer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ var builtinTokenPatterns = []TokenPattern{
484484
},
485485
{
486486
Placeholder: placeholderByPattern[pFilepath],
487-
RE: `(/[a-zA-Z0-9-]+)+`,
487+
RE: `(/[a-zA-Z0-9-_.]+)+`,
488488
mask: pFilepath,
489489
},
490490
{

plugin/action/hash/normalize/token_normalizer_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ func TestTokenNormalizerBuiltin(t *testing.T) {
317317
"some /plugin/action/normalize here",
318318
"some /Users/seq-ui/action/playlist here",
319319
"some /home/user/photos here",
320+
"some /sys/kubepods.slice/kuber-buber.slice/photos_video-audio/container123.scope here",
320321
},
321322
patterns: "filepath",
322323
want: "some <filepath> here",

0 commit comments

Comments
 (0)