summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2014-02-18 21:45:40 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2014-02-18 21:45:40 (GMT)
commitdd86a25716364718cbac4b9ea4ee19415408eb77 (patch)
tree2ee044649809deb1c74f597dc70d0b0b26744bc3
parent32546fd154ce200ea9692ee81e8a0ca788b4520c (diff)
downloadsite-dd86a25716364718cbac4b9ea4ee19415408eb77.tar.gz
filter-github-emails: Don't rewrap code blocks
Don't wrap long lines in a code block.
-rwxr-xr-xlibexec/filter-github-emails3
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/filter-github-emails b/libexec/filter-github-emails
index 9b86f7e..6f1f3a6 100755
--- a/libexec/filter-github-emails
+++ b/libexec/filter-github-emails
@@ -119,8 +119,9 @@ sub bye {
119# 119#
120 120
121sub rewrap { 121sub rewrap {
122 my $wrap = sub { /^(?: {4}|\t)/ ? $_ : wrap('', '', $_) };
122 my @lines = split(/\n/, shift); 123 my @lines = split(/\n/, shift);
123 my @wrapped = map { wrap('', '', $_) } @lines; 124 my @wrapped = map { $wrap->($_) } @lines;
124 125
125 debug('Rewrapping text'); 126 debug('Rewrapping text');
126 return join("\n", @wrapped); 127 return join("\n", @wrapped);