From f1ecae80232def71a6ae72864cab77c3f0c4c112 Mon Sep 17 00:00:00 2001 From: Maxime Poulin Date: Sat, 2 Apr 2016 19:35:38 -0400 Subject: [PATCH] Display whitespace properly Fixes alignment in many server's motd as well as in-channel ASCII art --- client/css/style.css | 8 ++++++++ client/views/actions/action.tpl | 2 +- client/views/msg.tpl | 11 ++++++----- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/client/css/style.css b/client/css/style.css index f4c4eb66..c88a072c 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -760,6 +760,14 @@ button, color: #999; } +#chat .msg.motd .text, +#chat .msg.message .text, +#chat .msg.action .action-text, +#chat .msg.notice .text { + white-space: pre-wrap; + overflow: hidden; +} + #chat.hide-join .join, #chat.hide-mode .mode, #chat.hide-motd .motd, diff --git a/client/views/actions/action.tpl b/client/views/actions/action.tpl index ddb8efce..1fcced98 100644 --- a/client/views/actions/action.tpl +++ b/client/views/actions/action.tpl @@ -1,2 +1,2 @@ {{mode}}{{from}} -{{{parse text}}} +{{{parse text}}} diff --git a/client/views/msg.tpl b/client/views/msg.tpl index c3155ba4..7563d6b8 100644 --- a/client/views/msg.tpl +++ b/client/views/msg.tpl @@ -7,16 +7,17 @@ {{mode}}{{from}} {{/if}} - - {{#equal type "toggle"}} + {{#equal type "toggle"}} +
{{#if toggle}} {{partial "toggle"}} {{/if}} - {{else}} - {{{parse text}}} - {{/equal}} +
+ {{else}} + {{{parse text}}} + {{/equal}}