From 4eaa59c594bdd49df086f9ca53b7e55ea80dab9d Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Mon, 15 Oct 2018 04:38:35 +0800 Subject: [PATCH] Went back to using
 for multiline code.

---
 gateway/gateway.go | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gateway/gateway.go b/gateway/gateway.go
index 00844f58..1b3ec41e 100644
--- a/gateway/gateway.go
+++ b/gateway/gateway.go
@@ -258,7 +258,9 @@ func attrEscape(out *bytes.Buffer, src []byte) {
 	}
 }
 
-// Using  rather than 
 helpfully keeps Google Translate from trying to process it.
+// Using  rather than 
 keeps Google Translate from trying to process it.
+// BUT it collapses code into one line for some reason, and 
 preserves newlines.
+// #TODO Investigating the 
 combo might work.
 func (*renderer) BlockCode(out *bytes.Buffer, text []byte, info string) {
 	doubleSpace(out)
 
@@ -268,10 +270,10 @@ func (*renderer) BlockCode(out *bytes.Buffer, text []byte, info string) {
 	}
 	lang := info[:endOfLang]
 	if len(lang) == 0 || lang == "." {
-		out.WriteString("")
+		out.WriteString("
")
 	}
 	attrEscape(out, text)
-	out.WriteString("\n")
+	out.WriteString("
\n") } func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) []*BrMsgID {