Skip to content

Commit

Permalink
revert square brackets fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar committed Oct 20, 2023
1 parent f3025aa commit 935f67d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ class FileMatcher implements PathMatcher {
pattern = pattern.replaceAll("/+", "/");
pattern = pattern.replaceAll("\\{\\{+", "\\\\{\\\\{");
pattern = pattern.replaceAll("}}+", "\\\\}\\\\}");
pattern = pattern.replaceAll("\\[+", "\\\\[");
pattern = pattern.replaceAll("]+", "\\\\]");


// We *could* implement exactly what's documented. The idea would be to implement something like
// Java's Globs.toRegexPattern but supporting only the documented syntax. Instead, we will use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public void testFilterSourcesWithSpecialSymbols() {
sources.add(new File("/files/folder/sub/1.xml"));
sources.add(new File("/files/{{cookiecutter.module_name}}"));
sources.add(new File("/files/{{cookiecutter.module_name}}/1.xml"));
sources.add(new File("/files/[folder-sub]/1.xml"));
FileHelper fileHelper = new FileHelper(project.getBasePath());
List<File> actualResult = fileHelper.filterOutIgnoredFiles(sources, Arrays.asList(".*"));
assertEquals(sources, actualResult);
Expand Down

0 comments on commit 935f67d

Please sign in to comment.