diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-02-18 21:45:40 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-02-18 21:45:40 (GMT) |
commit | dd86a25716364718cbac4b9ea4ee19415408eb77 (patch) | |
tree | 2ee044649809deb1c74f597dc70d0b0b26744bc3 /libexec | |
parent | 32546fd154ce200ea9692ee81e8a0ca788b4520c (diff) | |
download | site-dd86a25716364718cbac4b9ea4ee19415408eb77.tar.gz |
filter-github-emails: Don't rewrap code blocks
Don't wrap long lines in a code block.
Diffstat (limited to 'libexec')
-rwxr-xr-x | libexec/filter-github-emails | 3 |
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 | ||
121 | sub rewrap { | 121 | sub 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); |