From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 52A0A1FA7E; Thu, 28 Aug 2014 02:47:42 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Cc: Eric Wong Subject: [PATCH 3/5] view: increase MAX_INLINE_QUOTED threshold to 12 Date: Thu, 28 Aug 2014 02:47:34 +0000 Message-Id: <1409194056-4735-3-git-send-email-e@80x24.org> X-Mailer: git-send-email 2.1.0.2.g6fb949a.dirty In-Reply-To: <1409194056-4735-1-git-send-email-e@80x24.org> References: <1409194056-4735-1-git-send-email-e@80x24.org> List-Id: 12 lines is half an 80x24 terminal, so it is probably a reasonable amount to quote. Often 5 lines was not enough for context. This feature is mainly to reduce scrolling necessary to view pages. --- lib/PublicInbox/View.pm | 2 +- t/feed.t | 9 +++++++++ t/view.t | 9 ++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 0d97428..2794339 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -11,7 +11,7 @@ use Email::MIME::ContentType qw/parse_content_type/; require POSIX; # TODO: make these constants tunable -use constant MAX_INLINE_QUOTED => 5; +use constant MAX_INLINE_QUOTED => 12; # half an 80x24 terminal use constant MAX_TRUNC_LEN => 72; use constant PRE_WRAP => '
';
 
diff --git a/t/feed.t b/t/feed.t
index 880716c..978e215 100644
--- a/t/feed.t
+++ b/t/feed.t
@@ -31,6 +31,15 @@ Date: Thu, 01 Jan 1970 00:00:00 +0000
 > I quote to much
 > I quote to much
 > I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
 
 msg $i
 
diff --git a/t/view.t b/t/view.t
index bc6fbed..91ba168 100644
--- a/t/view.t
+++ b/t/view.t
@@ -18,7 +18,14 @@ OK
 > We generate links to a separate full page where quoted-text is inline.
 > This is
 >
-> Currently 5 lines
+> Currently 12 lines
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
 > See MAX_INLINE_QUOTED
 
 hello world
-- 
EW