Allow .j2 ending on .yml/.yaml files #46
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the template file selection regex to support optional .j2 extensions, enabling Jinja syntax highlighting and preventing editor errors when using Jinja variables in
compose.yml
files.Old:
selectattr('path', 'regex', '.ya?ml$') |
New:
selectattr('path', 'regex', '\.ya?ml(\.j2)?$') |
This change allows files like
compose.yaml.j2
andcompose.yml.j2
to be recognized alongside standard YAML files.I've tested this change in my own setup and confirmed it does not break existing configurations.
Not sure if this was a problem for anyone else but maybe worth considering merging.