jekyll-template 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/template.rb +2 -6
- data/lib/jekyll/template/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b7aaec4de65f9be174eae2f240f3d2b71d19c90
|
4
|
+
data.tar.gz: f559b2f4735c757689fe65d4007816cbf3b83c43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ff767b706817cebb20e1d8da11b60b15f660394e968215a86524cdcb61e36398cbfc835743013638facf10b5291733b3e76e7ff760e092b6878e241a34ad348
|
7
|
+
data.tar.gz: 50c722d43da3d20db132d3e651214053ebf581db62ff6868c0da623871d5f32b316af0f43ed896b58cfda6e69efd7d03590a8a6c9018d1041e4f618243a42eae
|
data/lib/jekyll/template.rb
CHANGED
@@ -156,7 +156,7 @@ module Jekyll
|
|
156
156
|
# @param content { string }
|
157
157
|
def unindent(content)
|
158
158
|
# Remove initial whitespace
|
159
|
-
content = content.gsub(
|
159
|
+
content = content.gsub(/\A^\s*\n/, "")
|
160
160
|
|
161
161
|
# Remove indentations
|
162
162
|
whitespace_regex = %r!^\s*!m
|
@@ -174,10 +174,6 @@ module Jekyll
|
|
174
174
|
# @param content { string }
|
175
175
|
def parse_front_matter(content)
|
176
176
|
# Strip leading white-spaces
|
177
|
-
compressor = HtmlCompressor::Compressor.new({
|
178
|
-
:preserve_line_breaks => true,
|
179
|
-
:remove_comments => false
|
180
|
-
})
|
181
177
|
content = unindent(content)
|
182
178
|
|
183
179
|
if content =~ YAML_FRONT_MATTER_REGEXP
|
@@ -192,7 +188,7 @@ module Jekyll
|
|
192
188
|
content = content.gsub(front_matter, "")
|
193
189
|
end
|
194
190
|
|
195
|
-
|
191
|
+
content
|
196
192
|
end
|
197
193
|
|
198
194
|
end
|