The filter only replaces the first match in the path instead of all matches.
e.g.
the output for {{ node.package | replace('.', '/') }}/Test.java is foo/bar/baz/Test.java
but the output for {{ node.package | package2path }}/Test.java is foo/bar.baz/Test.java
The filter only replaces the first match in the path instead of all matches.
e.g. the output for
{{ node.package | replace('.', '/') }}/Test.java
isfoo/bar/baz/Test.java
but the output for{{ node.package | package2path }}/Test.java
isfoo/bar.baz/Test.java