octopress-include-tag 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/octopress-include-tag.rb +4 -4
- data/lib/octopress-include-tag/version.rb +1 -1
- data/test/_expected/includes.html +1 -0
- data/test/_includes/foo.html +1 -1
- data/test/includes.html +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8f3dbc10b79eb0ad3bbf180840ab99c0252a17d
|
4
|
+
data.tar.gz: fceb136801a8723a4ed806a240db5bc9c1064d1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5669bf4116bbaa83c2de03254037df3906055ebe7fc8f2be23ae68ebd0c2a4e1a2daf230ca4821a2ad93eb4c460e646af375a72d777d558ef60e999360dd509
|
7
|
+
data.tar.gz: 64a34a2a3dbe86244cd1161dce19e2ed5993f411b4aad98ac26474b8e7fdd2a341cdb29cad6d75944e14ee0e9a8087a2cbbae0ef1a732a64c688ff82e041cd78
|
data/CHANGELOG.md
CHANGED
@@ -30,17 +30,17 @@ module Octopress
|
|
30
30
|
#
|
31
31
|
def safe_markup(markup)
|
32
32
|
file = markup.strip.match(/\S+/)[0]
|
33
|
-
params =
|
33
|
+
params = []
|
34
34
|
|
35
|
-
|
36
|
-
params
|
35
|
+
markup.scan(Regexp.compile('('+VALID_SYNTAX.to_s+')+')).each do |param|
|
36
|
+
params << param.first
|
37
37
|
end
|
38
38
|
|
39
39
|
if matched = tag_markup.match(VARIABLE_SYNTAX)
|
40
40
|
file = matched['variable']
|
41
41
|
end
|
42
42
|
|
43
|
-
[file, params]
|
43
|
+
[file, params.join(' ')]
|
44
44
|
end
|
45
45
|
|
46
46
|
def render(context)
|
data/test/_includes/foo.html
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Testing Include {{ include.some_var }}
|
1
|
+
Testing Include {{ include.some_var }}{% if include.another_var == 'awesome' %} - another var!{% endif %}
|
data/test/includes.html
CHANGED
@@ -12,6 +12,7 @@ Testing Include → {% include {{ page.partial }} %}
|
|
12
12
|
|
13
13
|
## Local var passing
|
14
14
|
Testing Include var_test → {% include foo.html some_var="var_test" %}
|
15
|
+
Testing Include var_test - another var! → {% include foo.html some_var="var_test" another_var="awesome" %}
|
15
16
|
|
16
17
|
## Filter testing
|
17
18
|
TESTING INCLUDE → {% include foo.html | upcase %}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopress-include-tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octopress-tag-helpers
|