Skip to content

Commit

Permalink
update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoAtGit committed Jan 16, 2024
1 parent 47eea80 commit 56d8aba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/minified/minified.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ func isMinifiedJSON(content string) bool {
return float64(nonWhitespaceCount)/float64(len(content)) > minifiedThreshold
}

// minification is not a standard practice in yaml
// heuristic, check for newline followed by whitespace
func isMinifiedYAML(content string) bool {
// Check for lack of indentation
return strings.Contains(content, "\n") && !strings.Contains(content, "\n ")
return !strings.Contains(content, "\n ")
}

0 comments on commit 56d8aba

Please sign in to comment.