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 := ""
|
output := ""
|
||||||
for i := startLine; i < endLine; i += 1 {
|
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))
|
this.renderTemplate(w, []byte(output))
|
||||||
@ -327,15 +327,15 @@ func (this *ArchiveState) renderTemplateHead(w http.ResponseWriter) {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layout-body" id="chatarea">
|
<div class="layout-body" id="chatarea">`,
|
||||||
`))
|
))
|
||||||
|
|
||||||
// Header ends
|
// Header ends
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ArchiveState) renderTemplateFoot(w http.ResponseWriter) {
|
func (this *ArchiveState) renderTemplateFoot(w http.ResponseWriter) {
|
||||||
w.Write([]byte(`
|
w.Write([]byte(`</div>
|
||||||
</div>
|
|
||||||
<script type="text/javascript" src="/archive.js?nonce=` + fmt.Sprintf("%d", this.svr.startup.Unix()) + `"></script>
|
<script type="text/javascript" src="/archive.js?nonce=` + fmt.Sprintf("%d", this.svr.startup.Unix()) + `"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -61,6 +61,7 @@ select {
|
|||||||
|
|
||||||
#chatarea {
|
#chatarea {
|
||||||
word-break:break-word;
|
word-break:break-word;
|
||||||
|
white-space: pre;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timestamp {
|
.timestamp {
|
||||||
|
Loading…
Reference in New Issue
Block a user