commit c22dd514c50aa46655b9f412167129e981a3dcd5
parent db58a6654333efe2fe6158bced19368d26e6a947
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Tue, 6 Jun 2023 02:30:49 -0700
move code
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/pkg/web/handlers/api/v1/topBarHandler.go b/pkg/web/handlers/api/v1/topBarHandler.go
@@ -1084,6 +1084,13 @@ func convertLinks(in string,
return quote + newRest
}
+func convertNewLines(html string, canUseMultiline bool) string {
+ if !canUseMultiline {
+ html = strings.ReplaceAll(html, "\n", "")
+ }
+ return html
+}
+
func extractPGPMessage(html string) (out string) {
pgpPrefixL := pgpPrefix
pgpSuffixL := pgpSuffix
@@ -1101,13 +1108,6 @@ func extractPGPMessage(html string) (out string) {
return out
}
-func convertNewLines(html string, canUseMultiline bool) string {
- if !canUseMultiline {
- html = strings.ReplaceAll(html, "\n", "")
- }
- return html
-}
-
// Auto convert pasted pgp public key into uploaded file
func convertPGPPublicKeyToFile(db *database.DkfDB, html string, authUserID database.UserID) string {
pgpPKeyPrefixL := pgpPKeyPrefix