From 4cab55c21175b09d600ff65716e2b6210f7eae53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Mon, 5 Feb 2024 06:00:17 +0100 Subject: [PATCH] Fix button for uploading OPML --- html.go | 9 +++-- html_test.go | 7 +++- main.go | 1 + opml.go | 94 ++++++++++++++++++++++++++++++++++++++++++++ opml_test.go | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++ views.go | 73 +++++++++++++++++++++++++++++++---- 6 files changed, 277 insertions(+), 14 deletions(-) create mode 100644 opml.go create mode 100644 opml_test.go diff --git a/html.go b/html.go index f5732da..b8abadc 100644 --- a/html.go +++ b/html.go @@ -17,6 +17,7 @@ type HTMLData struct { Author string CanonicalURL string Content string + ParseResult []ParseResult } func minifyHTML(h string) string { @@ -98,7 +99,7 @@ textarea { } ` -func fullHTML(h HTMLData, ParseResult []ParseResult) string { +func fullHTML(h HTMLData) string { var sb strings.Builder var errorBuilder strings.Builder @@ -106,9 +107,9 @@ func fullHTML(h HTMLData, ParseResult []ParseResult) string { DatabaseSize := GetDBSize() // This is the error message that will be displayed if there are any errors - if len(ParseResult) > 0 { - errorBuilder.WriteString("

Results