aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfilters/hldiff6
-rwxr-xr-xfilters/plaintext3
2 files changed, 9 insertions, 0 deletions
diff --git a/filters/hldiff b/filters/hldiff
index a17f17b..64e95d2 100755
--- a/filters/hldiff
+++ b/filters/hldiff
@@ -10,6 +10,9 @@ BEGIN {
}
{
if (hit_diff == 0) {
+ # Strip carriage returns from line
+ gsub(/\r/, "", $0)
+
if ($0 ~ /^diff /) {
hit_diff = 1;
print bright $0 reset
@@ -23,6 +26,9 @@ BEGIN {
print $0
}
} else {
+ # Strip carriage returns from line
+ gsub(/\r/, "", $0)
+
if ($0 ~ /^-/) {
print red $0 reset
} else if ($0 ~ /^\+/) {
diff --git a/filters/plaintext b/filters/plaintext
index 71e33f7..cfaa170 100755
--- a/filters/plaintext
+++ b/filters/plaintext
@@ -5,6 +5,9 @@ BEGIN {
reset = "\x1B[0m"
}
{
+ # Strip carriage returns from line
+ gsub(/\r/, "", $0)
+
if ($0 ~ /^On .*, .* wrote:/ || $0 ~ /^>+/) {
print dim cyan $0 reset
} else {