diffyc32 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c381a8c1a57a87e203023821e6264c7f858edad60cebf692d0f10880ef49275
4
- data.tar.gz: b980b1c82b0b7370d5eaa4e4ef6bb276f2ad3f06a6b3aa81e24c8d46c5d241b8
3
+ metadata.gz: 544f6682cdc207700aed20124da3a3405ffb899d2fbe21d78baadbc1bf544849
4
+ data.tar.gz: 95a9ff6dc10001ecc93ef9b27fdf07fa3612879368ca02ae1c1a34863e178e17
5
5
  SHA512:
6
- metadata.gz: bcbffc87403b4ad31a9f152ccd243d73f64b0cc76fb3801876b4d4e7f082958aa4fed047067b4a64f339dcc6d1bb275eec614d67ae2345add67ba6cada8443fb
7
- data.tar.gz: 36f957f3b6cd572b120786d9988193a024f8a26934968c66e59d313505c47bd666a6b26ed0fcbbf52d786c1fa1ffe228bea924062a2efe127fd544f021dd8c35
6
+ metadata.gz: f7f5aaaf586af2f3b97d63232fd3b3b284f61f67099f5a412684ca16eacbf7476e26e94b4b7b4c260601ee32ec0037dd4a21c12fbf3e6731c25ec19501f6bddd
7
+ data.tar.gz: 63e18a7ab8958fb2d3ad5e444225612aa35927454697a29d950787494a8914fbfe220723166736816b5e1d001dea1719c78a0813bc925cc3ccce440fa99c1d9f
Binary file
data.tar.gz.sig CHANGED
@@ -1,3 +1 @@
1
- �;}, ����qA=|{3��Q�����<�c�T �*��`���fKtz����AP��� iC�`�5�Ϧ�N���3'px8l^���X`���k5Rxn@.���}ѕ�3&���κ��H�k�����w;W�]��\ch
2
- 3�m������.�ar&�v$�G�6n5Q��u�8K�-D�mI��+W
3
- .���G���L��N�O��0Q �@��4&:$�5 �:Jn
1
+ 하���p26�*���?Q~�����"M�UC'�i��y�Y���r����.L� ������[�f�Y�^&�r�c��#�.C^�^�RC��h�?��v��.���Q:cղ��w8���� ry�,������/}U�:����Z�̬M8�����%�ͪ+̧[m��y��o6o"����#�ژ'�Zt%�X��ʫw��HQi:Kp���P��\�;!CPk�/\UB(ʴ���fq\���!����#��"�|%z߼�hja��EQ&���qd��B`�{Ó)4�6qV��t�Ւ����L�ɻ��N׬��U��y-���/���gCl��lcd@�W�Ci~�g'm$]��k��:�e�@W��T��b��iN�
@@ -11,6 +11,7 @@ class DiffyC32
11
11
  using ColouredText
12
12
 
13
13
  def initialize(s1, s2)
14
+
14
15
  html = Diffy::Diff.new(s1, s2).to_s(:html)
15
16
 
16
17
  doc = Rexle.new(html)
@@ -18,11 +19,21 @@ class DiffyC32
18
19
  a2 = a.map do |e|
19
20
  txt = case e.name.to_sym
20
21
  when :del
21
- colour_strong(e, :red)
22
- ' - '.red + ' ' + e.plaintext
22
+ if e.text('strong').to_s =~ /^\s+$/ then
23
+ colour_strong(e, :bg_gray)
24
+ else
25
+ colour_strong(e, :red)
26
+ end
27
+ ' - '.red + ' ' + e.plaintext
23
28
  when :ins
24
- colour_strong(e) {|x| x.light_green}
25
- ' + '.green + ' ' + e.plaintext
29
+ puts e.text('strong').to_s.inspect
30
+ if e.text('strong').to_s =~ /^\s+$/ then
31
+ colour_strong(e, :bg_green)
32
+ else
33
+ colour_strong(e) {|x| x.light_green}
34
+ end
35
+ ' + '.green + ' ' + e.plaintext
36
+
26
37
  when :span
27
38
  ' ' + ' ' + e.plaintext
28
39
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diffyc32
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  5GpDj4tmBrPNtoutJd1hwwEk/nNh5en7ImC3S/kZAX6iDdHjoFEa0tw+nwivCqqb
36
36
  hY2DvBZIWjVw7AsIOPl8Gwtq
37
37
  -----END CERTIFICATE-----
38
- date: 2020-09-11 00:00:00.000000000 Z
38
+ date: 2020-09-15 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: c32
metadata.gz.sig CHANGED
Binary file