From 150ad01111c3a2c294fa5bdccf47dcd7ff0ee7f9 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 25 Sep 2015 14:18:18 +1000 Subject: [PATCH] improve UX remove username said if we have a title --- app/assets/javascripts/discourse/dialects/quote_dialect.js | 3 ++- spec/components/pretty_text_spec.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/dialects/quote_dialect.js b/app/assets/javascripts/discourse/dialects/quote_dialect.js index df299b133..68395103f 100644 --- a/app/assets/javascripts/discourse/dialects/quote_dialect.js +++ b/app/assets/javascripts/discourse/dialects/quote_dialect.js @@ -48,9 +48,10 @@ Discourse.BBCode.register('quote', {noWrap: true, singlePara: true}, function(co if (options.topicId && postNumber && options.getTopicInfo && topicId !== options.topicId) { var topicInfo = options.getTopicInfo(topicId); if (topicInfo) { - header.push(' '); var href = topicInfo.href; if (postNumber > 0) { href += "/" + postNumber; } + // get rid of username said stuff + header.pop(); header.push(['a', {'href': href}, topicInfo.title]); } } diff --git a/spec/components/pretty_text_spec.rb b/spec/components/pretty_text_spec.rb index b62875aff..25c603ef1 100644 --- a/spec/components/pretty_text_spec.rb +++ b/spec/components/pretty_text_spec.rb @@ -13,7 +13,7 @@ describe PrettyText do topic = Fabricate(:topic, title: "this is a test topic") expected = <
-
EvilTrout: This is a test topic +
This is a test topic

ddd

HTML