Skip to content

Commit

Permalink
Merge pull request #34 from matecat/fix-square-sprintf
Browse files Browse the repository at this point in the history
Fix regex
  • Loading branch information
mauretto78 authored Jul 14, 2023
2 parents b47e409 + e0a4535 commit 854143f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/Filters/SquareSprintf.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function transform( $segment ) {
'\[%.\d+f\]',
'\[%\d+\$.\d+f\]',
'\[%.\d+f:[a-z_]+\]',
'\[%[a-z_]+:([a-z_]+|\d+)%\]',
'\[%[a-z_]+:\d+%\]',
];

$regex = '/'.implode("|", $tags).'/iu';
Expand Down
2 changes: 0 additions & 2 deletions tests/MateCatSubFilteringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -975,10 +975,8 @@ public function testWithSquareSprintf() {
'[%.222f:name]',
'[%.2f:placeholder]',
'[%.2f:place_holder]',
'[%key_id:key_id%]',
'[%key_id:1234%]',
'[%test:1234%]',
'[%test:test%]',
];

foreach ($tags as $tag){
Expand Down

0 comments on commit 854143f

Please sign in to comment.