Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemented detection for mixed usage of .template #4

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

Andrwe
Copy link
Contributor

@Andrwe Andrwe commented Jun 18, 2020

This changes the filetype detection to allow writing .template files in json and yaml.
It detects json by searching the content for a line matching ^\s*\{ which is a syntax required by JSON syntax and rarely, if not never, used by YAML. When there is no line matching this pattern the file is assumed to be YAML.

Signed-off-by: Andrwe Lord Weber github@andrwe.org

Signed-off-by: Andrwe Lord Weber <github@andrwe.org>
@speshak
Copy link
Owner

speshak commented Jun 19, 2020

I like it. Thanks for the contribution.

@speshak speshak merged commit 3300b32 into speshak:master Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants