preserve consecutive whitespaces in chat messages
This commit is contained in:
parent
a087ad2e7b
commit
3f4d5e2522
@ -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>
|
||||
|
@ -61,6 +61,7 @@ select {
|
||||
|
||||
#chatarea {
|
||||
word-break:break-word;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.timestamp {
|
||||
|
Loading…
Reference in New Issue
Block a user