ipynbdiff 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f26544b121fc120490029ee5e708efbd1e90ad085e5bf973fbb29214a04d7c8
4
- data.tar.gz: cbcfa68cdf53ce539374c3053b95d7ebb4e27e57d09bf77b23b1f1297bced097
3
+ metadata.gz: ff3a6405d5c4034108fee997d678bee634a516f1d773b0aa9e8c7e4f50b7f28e
4
+ data.tar.gz: 3a80027ec239810e6b3daaa637fc338c5a34e3ae75c2f33043303eb6e16f6980
5
5
  SHA512:
6
- metadata.gz: 897ddec211a46b69ab9cdd8a0ecddc946c67f1a51557f7205a305ae1ce35a32890120a1cb640082b4f3d7e8739c2172e56085d2987badfa32775adc48ca87b1d
7
- data.tar.gz: 7516f6c3b5ac3d2a38f3ea78c54f293b49643260321f4ca452d46d4adc11e6d9447de4938cc5cb9de2c6b9d9b71abebf407de7252edffe3df51e997c919622fe
6
+ metadata.gz: 6d126961600c8073f2ead97b26d2879f987f15d6e3c74f0c9e2bd64c020bc8fd7963f4b50a69fd28c98728c645b595dbdda5883f4f56e18aa949df589e3787d0
7
+ data.tar.gz: 30e2c855b51de45ad2147419a455a4adc8f4f3cd30445f32a9667e3f17a072c3e59bcc8e603e34be2c7216e0b9671e2ed283e827780b4da25bff4be03f733ed6
@@ -52,24 +52,20 @@ module IpynbDiff
52
52
  new_symbol = symbol_prefix / output_type
53
53
  case output_type
54
54
  when 'image/png', 'image/jpeg'
55
- transform_image(output_type, output_element, new_symbol)
55
+ transform_image(output_type + ';base64', output_element, new_symbol)
56
56
  when 'image/svg+xml'
57
- transform_svg(output_element, new_symbol)
57
+ transform_image(output_type + ';utf8', output_element, new_symbol)
58
58
  when 'text/markdown', 'text/latex', 'text/plain', 'text'
59
59
  transform_text(output_element, new_symbol)
60
60
  end
61
61
  end
62
62
 
63
63
  def transform_image(image_type, image_content, symbol)
64
- _(symbol, " ![](data:#{image_type};base64,#{image_content.gsub("\n", '')})")
65
- end
66
-
67
- def transform_svg(image_content, symbol)
68
64
  lines = image_content.is_a?(Array) ? image_content : [image_content]
69
65
 
70
66
  single_line = lines.map(&:strip).join.gsub(/\s+/, ' ')
71
67
 
72
- _(symbol, " ![](data:image/svg+xml;utf8,#{single_line})")
68
+ _(symbol, " ![](data:#{image_type},#{single_line})")
73
69
  end
74
70
 
75
71
  def transform_text(text_content, symbol)
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # lib/emoticon/version.rb
2
2
 
3
3
  module IpynbDiff
4
- VERSION = "0.4.5"
4
+ VERSION = "0.4.6"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipynbdiff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Bonet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-13 00:00:00.000000000 Z
11
+ date: 2022-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diffy