[Rt-commit] rt branch, 4.4/wrap-column-count, repushed
Blaine Motsinger
blaine at bestpractical.com
Fri Mar 15 18:21:49 EDT 2019
The branch 4.4/wrap-column-count was deleted and repushed:
was 33efcf449fe691f3e4ff442c8ea418f661273bae
now e36c9fecd90ca98609db809bb0bfb92f35a3ae0a
1: 33efcf449 ! 1: e36c9fecd Added configurable option for wrap column count
@@ -7,9 +7,7 @@
now be configured through RT_SiteConfig.pm with the QuoteWrapWidth
variable.
- Set( $QuoteWrapWidth, 110 );
-
- Additionally, the default value has been raised from 70 to 100.
+ Set( $QuoteWrapWidth, 70 );
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
--- a/etc/RT_Config.pm.in
@@ -18,7 +16,6 @@
Set($QuoteFolding, 1);
--=back
+=item C<$QuoteWrapWidth>
+
+C<$QuoteWrapWidth> controls the number of columns to use when wrapping
@@ -26,10 +23,11 @@
+
+=cut
+
-+Set($QuoteWrapWidth, 100);
++Set($QuoteWrapWidth, 70);
++
+ =back
- =head1 Application logic
diff --git a/lib/RT/Transaction.pm b/lib/RT/Transaction.pm
--- a/lib/RT/Transaction.pm
@@ -42,7 +40,7 @@
-at $args{'Wrap'}. $args{'Wrap'} defaults to 70.
+Takes a paramhash. If the $args{'Quote'} parameter is set, wraps this message
+at $args{'Wrap'}. $args{'Wrap'} is configurable through the QuoteWrapWidth
-+config setting and defaults to 100 characters.
++config variable and defaults to 70 characters.
If $args{'Type'} is set to C<text/html>, this will return an HTML
part of the message, if available. Otherwise it looks for a text/plain
@@ -60,7 +58,9 @@
}
- if ( $max > 76 ) {
-+ if ( $max > $args{cols} ) {
++ # the addition of 6 here accounts for the extra characters added when quoting
++ # previously quoted text.
++ if ( $max > $args{cols} + 6 ) {
require Text::Quoted;
require Text::Wrapper;
More information about the rt-commit
mailing list