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 +4 -4
- data/lib/styledown.rb +7 -8
- data/lib/styledown/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c998d753c749f402667ce722976ca0657555bc8
|
4
|
+
data.tar.gz: 37f40de1f007af11048c857eaefef48dcfd25f34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da28841d136a3775a0db50f3e85de86818d11da9f16d5e6be4b5b95d412802cbe73c67f4a98da5871a42acd1271c69c95683d8df13d30ce5ac9c65ffdd236cad
|
7
|
+
data.tar.gz: 6716ab28e94de38c888588c76d07fe70304f79c86b0f89d164f9ae278c43d8e2f5fa2f2d504b72c3cc249de0afd5594fd7d2a02a78731f3cfd967e4a43cba7f8
|
data/lib/styledown.rb
CHANGED
@@ -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
|
-
|
118
|
-
if
|
119
|
-
new_lang, new_content = blk.(
|
120
|
-
|
121
|
-
|
122
|
-
|
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
|
|
data/lib/styledown/version.rb
CHANGED
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.
|
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-
|
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.
|
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.
|
26
|
+
version: 2.0.0.pre7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: execjs
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|