more updates

This commit is contained in:
2025-05-24 11:59:34 +02:00
parent 97297be163
commit 707e87e454
10 changed files with 363 additions and 18 deletions

View File

@@ -21,6 +21,13 @@ func NewDiagram(description []byte, imgType string) *Diagram {
fmt.Printf("DEBUG: After TrimSpace: %q\n", trimmed)
fmt.Printf("DEBUG: Still contains newlines: %t\n", strings.Contains(trimmed, "\n"))
// Decode NEWLINE markers back to actual newlines for complex diagrams
if strings.Contains(trimmed, " NEWLINE ") {
trimmed = strings.ReplaceAll(trimmed, " NEWLINE ", "\n")
fmt.Printf("DEBUG: After NEWLINE decoding: %q\n", trimmed)
fmt.Printf("DEBUG: Now contains newlines: %t\n", strings.Contains(trimmed, "\n"))
}
return &Diagram{
description: []byte(trimmed),
lastTouched: time.Now(),