user/dev discussion of public-inbox itself
 help / color / 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
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 index

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: https://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

user/dev discussion of public-inbox itself

Archives are clonable:
	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
	nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git