Merge pull request #1309 from jmd1010/feature/web-ui-enhancements

Feature/Web Svelte GUI Enhancements: Pattern Descriptions, Tags, Favorites, Search Bar, Language Integration, PDF file conversion, etc
This commit is contained in:
Eugen Eisler
2025-02-24 21:09:23 +01:00
committed by GitHub
70 changed files with 7662 additions and 8021 deletions

View File

@@ -191,7 +191,7 @@ func writeSSEResponse(w gin.ResponseWriter, response StreamResponse) error {
return nil
}
func detectFormat(content string) string {
/* func detectFormat(content string) string {
if strings.HasPrefix(content, "graph TD") ||
strings.HasPrefix(content, "gantt") ||
strings.HasPrefix(content, "flowchart") ||
@@ -208,4 +208,15 @@ func detectFormat(content string) string {
return "markdown"
}
return "plain"
} */
func detectFormat(content string) string {
if strings.HasPrefix(content, "graph TD") ||
strings.HasPrefix(content, "gantt") ||
strings.HasPrefix(content, "flowchart") ||
strings.HasPrefix(content, "sequenceDiagram") ||
strings.HasPrefix(content, "classDiagram") ||
strings.HasPrefix(content, "stateDiagram") {
return "mermaid"
}
return "markdown"
}