ipynbdiff 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ipynbdiff.gemspec +1 -1
- data/lib/transformer.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80e13b121205b2811ffb5d508e0978284562ced1b359156530b32ec2e10de6d4
|
4
|
+
data.tar.gz: 9a64f732b7e2ca0143bab893eb8e7713761f533d79798935d137d88d58f401e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27f12477595add7a90f8f8d3ebf3b46b32ae24ec5c25a9417b03ff52d0be47ca68db501a2feca3337a0e8cf8ccee257cceccb7b9cbbf6716680641fb00a6a7f7
|
7
|
+
data.tar.gz: b1c3cd5e12a5f949be5e14c1dd2b69b93304b4b507787c91f8d7cc383855bcf52dabf2edbfe4a67e4410e20d575686f71dbfe5d2b7b4853678acf978555c4cd4
|
data/ipynbdiff.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'ipynbdiff'
|
5
|
-
s.version = '0.3.
|
5
|
+
s.version = '0.3.3'
|
6
6
|
s.summary = 'Human Readable diffs for Jupyter Notebooks'
|
7
7
|
s.description = 'Better diff for Jupyter Notebooks by first preprocessing them and removing clutter'
|
8
8
|
s.authors = ['Eduardo Bonet']
|
data/lib/transformer.rb
CHANGED
@@ -18,7 +18,7 @@ module IpynbDiff
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.transform_code_cell(cell, notebook)
|
21
|
-
tags = cell['metadata']
|
21
|
+
tags = cell['metadata']&.fetch('tags', [])&.join(' ') || ''
|
22
22
|
|
23
23
|
[
|
24
24
|
%(<div class="cell code" data-id="#{cell['id']}" data-tags="#{tags}">\n\n),
|
@@ -76,7 +76,7 @@ module IpynbDiff
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def self.transform_text_cell(cell)
|
79
|
-
tags = cell['metadata']
|
79
|
+
tags = cell['metadata']&.fetch('tags', [])&.join(' ') || ''
|
80
80
|
id = cell['id']
|
81
81
|
cell_type = cell['cell_type']
|
82
82
|
|