user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: meta@public-inbox.org
Cc: Kyle Meyer <kyle@kyleam.com>
Subject: [PATCH 1/2] view: strip omission character from current message in thread view
Date: Tue, 21 Apr 2020 21:33:58 -0400	[thread overview]
Message-ID: <20200422013359.16149-2-kyle@kyleam.com> (raw)
In-Reply-To: <20200422013359.16149-1-kyle@kyleam.com>

In the thread view shown at the top of a message, the subject for the
current message is dropped, leaving just the sender's name.  However,
if skel_dump() omitted part of the subject because it was duplicated,
the omission character is still displayed:

  * [PATCH v2] t/www_listing: avoid 'once' warnings
    2020-03-21  1:10 ` [PATCH 2/2] t/www_listing: avoid 'once' warnings Eric Wong
  @ 2020-03-21  5:24   ` " Eric Wong

Note the " on the last line.

Adjust the regular expression in _th_index_lite() to account for the
omission character.
---
 lib/PublicInbox/View.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 9b62ed3c..c90eaf6a 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -322,7 +322,7 @@ sub _th_index_lite {
 	my $s_s = nr_to_s($nr_s, 'sibling', 'siblings');
 	my $s_c = nr_to_s($nr_c, 'reply', 'replies');
 	$attr =~ s!\n\z!</b>\n!s;
-	$attr =~ s!<a\nhref.*</a> !!s; # no point in duplicating subject
+	$attr =~ s!<a\nhref.*</a> (&#34; )?!!s; # no point in duplicating subject
 	$attr =~ s!<a\nhref=[^>]+>([^<]+)</a>!$1!s; # no point linking to self
 	$rv .= "<b>@ $attr";
 	if ($nr_c) {
-- 
2.26.0


  reply	other threads:[~2020-04-22  1:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22  1:33 [PATCH 0/2] view: two display fixes for deduped subjects Kyle Meyer
2020-04-22  1:33 ` Kyle Meyer [this message]
2020-04-22  7:01   ` [PATCH 1/2] view: strip omission character from current message in thread view Eric Wong
2020-04-22 15:44     ` Kyle Meyer
2020-04-22  1:33 ` [PATCH 2/2] view: actually omit subject text when dumping topics Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200422013359.16149-2-kyle@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).