Skip to content

Commit

Permalink
Merge pull request #9528 from RocketChat/hotfix/last-message-layout
Browse files Browse the repository at this point in the history
Fix: Last message layout breaking with Markdown and Code Highlight
  • Loading branch information
rodrigok authored Jan 27, 2018
2 parents 316bc8c + 711e8e6 commit 3f070ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,14 @@
min-height: 13px;
}

& > p,
& code,
& pre {
display: inline;

white-space: unset;
}

& br {
display: none;
& * {
display: inline !important;
white-space: unset !important;
background-color: unset !important;
color: inherit !important;
font-weight: unset !important;
font-family: inherit !important;
padding: unset !important;
}

& a {
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-ui-sidenav/client/sidebarItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Template.sidebarItem.onCreated(function() {
if (currentData.lastMessage) {
if (currentData.lastMessage._id) {
const otherUser = RocketChat.settings.get('UI_Use_Real_Name') ? currentData.lastMessage.u.name || currentData.lastMessage.u.username : currentData.lastMessage.u.username;
const renderedMessage = renderMessageBody(currentData.lastMessage);
const renderedMessage = renderMessageBody(currentData.lastMessage).replace(/<br\s?\\?>/g, ' ');
const sender = Meteor.userId() === currentData.lastMessage.u._id ? t('You') : otherUser;

if (currentData.t === 'd' && Meteor.userId() !== currentData.lastMessage.u._id) {
Expand Down

0 comments on commit 3f070ce

Please sign in to comment.