diff_highlight 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/diff_highlight.rb +11 -1
- data/lib/diff_highlight/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db6df0fff558816706af0e3a49d6763447c848ed
|
4
|
+
data.tar.gz: 6052f9eb75c476d36366331753aaae5176a071a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45565de6a86e5815aff29c717de19ed7388f39250f75fd6c61659563792816a9f3bc44466e8b9df45caa374cad7417f93b4750181d04493f3c9fabe213834068
|
7
|
+
data.tar.gz: 8246ac5c8b492bd6f73457a35faada30aa023a4a86e26841f845cee8264657d2a73ff7a511082d7f5e0e6095b0a22325dee2cb595b714429a095fde737d5053c
|
data/README.md
CHANGED
data/lib/diff_highlight.rb
CHANGED
@@ -79,8 +79,10 @@ class DiffHighlight
|
|
79
79
|
def write_other_line(line)
|
80
80
|
if line =~ /^-[^-]/
|
81
81
|
write(red(line))
|
82
|
+
elsif line =~ /^(commit|Author|Date)/
|
83
|
+
write(bold(line))
|
82
84
|
else
|
83
|
-
write(line)
|
85
|
+
write(normal(line))
|
84
86
|
end
|
85
87
|
end
|
86
88
|
|
@@ -95,4 +97,12 @@ class DiffHighlight
|
|
95
97
|
def green(str)
|
96
98
|
"\e[32m#{str}\e[0m"
|
97
99
|
end
|
100
|
+
|
101
|
+
def bold(str)
|
102
|
+
"\e[1m#{str}\e[22m"
|
103
|
+
end
|
104
|
+
|
105
|
+
def normal(str)
|
106
|
+
"\e[0m#{str}"
|
107
|
+
end
|
98
108
|
end
|