contentfs 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/contentfs/content.rb +11 -7
- data/lib/contentfs/version.rb +1 -1
- 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: 77679e7cfe4c3077753ec0b425edec31318c17272070713a4831f80b6878de3e
|
4
|
+
data.tar.gz: b07a87ccbfa7e5adcfbd193076af48ed7109b0240224c68e640c2189058c41c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97667d012f6b9b94dfdf74281ce53bf47966b7bf2da4e375c6d433ef7917f6f906ea5e7497424aaac2bb95fd65ab8149c8d429749a14cc5389b8fd1e2b0d7deb
|
7
|
+
data.tar.gz: 65baae29aa627cb17ec18e657955dca9caad84eacff8a3ff2ce0c85696eeeb235820f3975a76dc66610c706605c2a892c64420ad775a977f1b0eef2a8c238fe6
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## [v0.6.1](https://github.com/metabahn/contentfs/releases/tag/v0.6.1)
|
2
|
+
|
3
|
+
*released on 2021-04-02*
|
4
|
+
|
5
|
+
* `fix` [#13](https://github.com/metabahn/contentfs/pull/13) Resolve includes after rendering ([bryanp](https://github.com/bryanp))
|
6
|
+
|
1
7
|
## [v0.6.0](https://github.com/metabahn/contentfs/releases/tag/v0.6.0)
|
2
8
|
|
3
9
|
*released on 2021-04-02*
|
data/lib/contentfs/content.rb
CHANGED
@@ -44,19 +44,23 @@ module ContentFS
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def render
|
47
|
-
|
47
|
+
if @format && (renderer = Renderers.resolve(@format))
|
48
|
+
resolve_includes(renderer.render(@content))
|
49
|
+
else
|
50
|
+
resolve_includes(to_s)
|
51
|
+
end
|
52
|
+
end
|
48
53
|
|
49
|
-
|
54
|
+
private def resolve_includes(content)
|
55
|
+
working_content = content.dup
|
56
|
+
|
57
|
+
content.scan(INCLUDE_REGEXP) do |match|
|
50
58
|
if (include = @database.find_include(match[0]))
|
51
59
|
working_content.gsub!($~.to_s, include.render)
|
52
60
|
end
|
53
61
|
end
|
54
62
|
|
55
|
-
|
56
|
-
renderer.render(working_content)
|
57
|
-
else
|
58
|
-
to_s
|
59
|
-
end
|
63
|
+
working_content
|
60
64
|
end
|
61
65
|
|
62
66
|
private def parse_metadata(content)
|
data/lib/contentfs/version.rb
CHANGED