mirror of
https://github.com/mudler/LocalAI.git
synced 2025-12-30 14:10:24 -06:00
Revert "chore(gallery agent): try fixing linting errors"
This reverts commit b0eb1ab2a1.
This commit is contained in:
14
.github/gallery-agent/gallery.go
vendored
14
.github/gallery-agent/gallery.go
vendored
@@ -43,19 +43,7 @@ func generateYAMLEntry(model ProcessedModel, familyAnchor string) string {
|
||||
description = cleanTextContent(description)
|
||||
|
||||
// Format description for YAML (indent each line and ensure no trailing spaces)
|
||||
// Handle empty lines properly to avoid spaces-only lines
|
||||
lines := strings.Split(description, "\n")
|
||||
var formattedLines []string
|
||||
for _, line := range lines {
|
||||
if strings.TrimSpace(line) == "" {
|
||||
// Empty line - don't add spaces
|
||||
formattedLines = append(formattedLines, "")
|
||||
} else {
|
||||
// Non-empty line - add proper indentation
|
||||
formattedLines = append(formattedLines, " "+line)
|
||||
}
|
||||
}
|
||||
formattedDescription := strings.Join(formattedLines, "\n")
|
||||
formattedDescription := strings.ReplaceAll(description, "\n", "\n ")
|
||||
// Remove any trailing spaces from the formatted description
|
||||
formattedDescription = strings.TrimRight(formattedDescription, " \t")
|
||||
yamlTemplate := ""
|
||||
|
||||
Reference in New Issue
Block a user