styledown2 2.0.0.pre5 → 2.0.0.pre7

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
  SHA1:
3
- metadata.gz: 4eaad569e5408829bb0289e13088fe4638a65d8a
4
- data.tar.gz: d3c45314499459d4667aa06f911b4a2cf815977d
3
+ metadata.gz: 7c998d753c749f402667ce722976ca0657555bc8
4
+ data.tar.gz: 37f40de1f007af11048c857eaefef48dcfd25f34
5
5
  SHA512:
6
- metadata.gz: dbd4d66a476871d50a819bc7e2e942575f1fb04310595ec9f72de7d634f9964a4e6d22ce99b5a89838771f3a114fcac6e72be81be7ba557fb0ae9348274999ac
7
- data.tar.gz: 74a62fe9d0020462a1f948923fecd32a417987b3558584611db43f12aaa6b7bf55055f6c2291dab6a7237f3a2a3f92724c3914027397278151f27034b07007e3
6
+ metadata.gz: da28841d136a3775a0db50f3e85de86818d11da9f16d5e6be4b5b95d412802cbe73c67f4a98da5871a42acd1271c69c95683d8df13d30ce5ac9c65ffdd236cad
7
+ data.tar.gz: 6716ab28e94de38c888588c76d07fe70304f79c86b0f89d164f9ae278c43d8e2f5fa2f2d504b72c3cc249de0afd5594fd7d2a02a78731f3cfd967e4a43cba7f8
@@ -114,15 +114,14 @@ class Styledown
114
114
 
115
115
  # Adds a function that will transform section part figures on `#render`.
116
116
  def add_figure_filter(lang, &blk)
117
- add_part_filter do |part, section, filename, file|
118
- if part['isExample'] && [*lang].map(&:to_s).include?(part['language'])
119
- new_lang, new_content = blk.(part['content'])
120
- part['content'] = new_content
121
- part['language'] = new_lang
122
- part
123
- else
124
- part
117
+ add_file_filter do |filename, file|
118
+ if file['layout'] == 'figure' && [*lang].map(&:to_s).include?(file['language'])
119
+ new_lang, new_content = blk.(file['content'])
120
+ file['content'] = new_content
121
+ file['language'] = new_lang
122
+ file
125
123
  end
124
+ [filename, file]
126
125
  end
127
126
  end
128
127
 
@@ -1,3 +1,3 @@
1
1
  class Styledown
2
- VERSION = '2.0.0.pre5'
2
+ VERSION = '2.0.0.pre7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: styledown2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre5
4
+ version: 2.0.0.pre7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rico Sta. Cruz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-22 00:00:00.000000000 Z
11
+ date: 2017-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: styledown2-source
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0.pre5
19
+ version: 2.0.0.pre7
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.0.pre5
26
+ version: 2.0.0.pre7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: execjs
29
29
  requirement: !ruby/object:Gem::Requirement