diff --git a/src/components/views/elements/Pill.tsx b/src/components/views/elements/Pill.tsx index f87e7c020d9..ab5313c210c 100644 --- a/src/components/views/elements/Pill.tsx +++ b/src/components/views/elements/Pill.tsx @@ -256,7 +256,7 @@ export default class Pill extends React.Component { tip = ; } - return + return { this.props.inMessage ? { onClick={onClick} onMouseOver={this.onMouseOver} onMouseLeave={this.onMouseLeave} - dir="auto" > { avatar } { linkText } @@ -274,13 +273,12 @@ export default class Pill extends React.Component { className={classes} onMouseOver={this.onMouseOver} onMouseLeave={this.onMouseLeave} - dir="auto" > { avatar } { linkText } { tip } } - ; + ; } else { // Deliberately render nothing if the URL isn't recognised return null; diff --git a/test/components/views/messages/TextualBody-test.tsx b/test/components/views/messages/TextualBody-test.tsx index 23c9fa206a0..d4b1b2aeadf 100644 --- a/test/components/views/messages/TextualBody-test.tsx +++ b/test/components/views/messages/TextualBody-test.tsx @@ -329,13 +329,13 @@ describe("", () => { const content = wrapper.find(".mx_EventTile_body"); expect(content.html()).toBe( '' + - 'A ' + - 'room name with vias', + 'room name with vias', ); }); diff --git a/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap b/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap index 783f72a697b..7537766df9d 100644 --- a/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap +++ b/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap @@ -14,4 +14,4 @@ exports[` renders formatted m.text correctly pills do not appear " `; -exports[` renders formatted m.text correctly pills get injected correctly into the DOM 1`] = `"Hey \\"\\"Member"`; +exports[` renders formatted m.text correctly pills get injected correctly into the DOM 1`] = `"Hey \\"\\"Member"`;