From 6b7da37235092f2500de8354030b58d0cc7a25ef Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 7 Jun 2019 19:08:17 -0400 Subject: Fix hldiff regex for short stats --- contrib/hldiff | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'contrib/hldiff') diff --git a/contrib/hldiff b/contrib/hldiff index 89aa9a2..5d7c422 100755 --- a/contrib/hldiff +++ b/contrib/hldiff @@ -1,4 +1,5 @@ #!/usr/bin/env -S awk -f +# vim: set ft=awk : BEGIN { bright = "\x1B[1m" red = "\x1B[31m" @@ -13,7 +14,7 @@ BEGIN { if ($0 ~ /^diff /) { hit_diff = 1; print bright $0 reset - } else if ($0 ~ /^ .*\|.*(\+|-)/) { + } else if ($0 ~ /^.*\|.*(\+|-)/) { left = substr($0, 0, index($0, "|")-1) right = substr($0, index($0, "|")) gsub(/-+/, red "&" reset, right) -- cgit v1.2.3