preserve consecutive whitespaces in chat messages

This commit is contained in:
mappu 2017-12-10 13:53:20 +13:00
parent a087ad2e7b
commit 3f4d5e2522
2 changed files with 6 additions and 5 deletions

View File

@ -95,7 +95,7 @@ func (this *ArchiveState) renderView(w http.ResponseWriter) {
output := ""
for i := startLine; i < endLine; i += 1 {
output += html.EscapeString(lines[i]) + "<br>\n"
output += html.EscapeString(lines[i]) + "\n"
}
this.renderTemplate(w, []byte(output))
@ -327,15 +327,15 @@ func (this *ArchiveState) renderTemplateHead(w http.ResponseWriter) {
</div>
<div class="layout-body" id="chatarea">
`))
<div class="layout-body" id="chatarea">`,
))
// Header ends
}
func (this *ArchiveState) renderTemplateFoot(w http.ResponseWriter) {
w.Write([]byte(`
</div>
w.Write([]byte(`</div>
<script type="text/javascript" src="/archive.js?nonce=` + fmt.Sprintf("%d", this.svr.startup.Unix()) + `"></script>
</body>
</html>

View File

@ -61,6 +61,7 @@ select {
#chatarea {
word-break:break-word;
white-space: pre;
}
.timestamp {