bridgetown-core 0.18.2 → 0.18.3

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
  SHA256:
3
- metadata.gz: 306a26e30d93c885f8e9580f31df3f10757b8d686337ac851a33c354689be225
4
- data.tar.gz: 2e258edc76ea89224865c9cbc48d9ae5fcd9dacd2070d99953c6f567644237ac
3
+ metadata.gz: aff1b7af860afa9442e9a9cc6f34b0dd48fa6677248a118acc794a60de6f6328
4
+ data.tar.gz: 3cfc657c9c5958cdf45cddf6bac5b1c84de276a8b10000b6b7a4c28d977f4ec1
5
5
  SHA512:
6
- metadata.gz: 9a03b2aaabcf0066e0cb634c95f9b5819db23b472887e1048b78e589c9815615986ed8bb943b77f8d272221448608a95f489d6db21508703dbf3123ec31623a1
7
- data.tar.gz: 2fc8d22203172c03db70520f430292833360c0eb39c91dde1a8d17d498c726295a8bc7183310468f981e5d236fa31a26fc3a564beb6e8179922d3975db6f876e
6
+ metadata.gz: ab2136623a924cead3223313b7ccd2cf46ffcc3c1c34de6096162d309e7e91ae2e1ce7af61abba4bc564cef67906977efead5780a27e5c4c407f14c2250e591e
7
+ data.tar.gz: 0a6a770a52c1d23906c5bfbe7fc45a60666dcdb25359eb184585594d94ef4de9ef97c4587b4272a3dc95f1a3a2bdeb8b9327ab92b621a0a9672e3ec33aeb7b83
@@ -101,6 +101,8 @@ module Bridgetown
101
101
  #
102
102
  # @return [String] The converted content.
103
103
  def convert(content, convertible)
104
+ return content if convertible.data[:template_engine] != "erb"
105
+
104
106
  erb_view = Bridgetown::ERBView.new(convertible)
105
107
 
106
108
  erb_renderer = Tilt::ErubiTemplate.new(
@@ -123,10 +125,13 @@ module Bridgetown
123
125
  if convertible.data[:template_engine] == "erb" ||
124
126
  (convertible.data[:template_engine].nil? &&
125
127
  @config[:template_engine] == "erb")
128
+ convertible.data[:template_engine] = "erb"
126
129
  return true
127
130
  end
128
131
 
129
- super(ext)
132
+ super(ext).tap do |ext_matches|
133
+ convertible.data[:template_engine] = "erb" if ext_matches
134
+ end
130
135
  end
131
136
 
132
137
  def output_ext(ext)
@@ -23,6 +23,8 @@ module Bridgetown
23
23
  #
24
24
  # @return [String] The converted content.
25
25
  def convert(content, convertible)
26
+ return content if convertible.data[:template_engine] != "liquid"
27
+
26
28
  self.class.cached_partials ||= {}
27
29
 
28
30
  @site = convertible.site
@@ -53,9 +55,14 @@ module Bridgetown
53
55
  # rubocop: enable Metrics/AbcSize
54
56
 
55
57
  def matches(ext, convertible)
56
- return true if convertible.render_with_liquid?
58
+ if convertible.render_with_liquid?
59
+ convertible.data[:template_engine] = "liquid"
60
+ return true
61
+ end
57
62
 
58
- super(ext)
63
+ super(ext).tap do |ext_matches|
64
+ convertible.data[:template_engine] = "liquid" if ext_matches
65
+ end
59
66
  end
60
67
 
61
68
  def output_ext(ext)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bridgetown
4
- VERSION = "0.18.2"
4
+ VERSION = "0.18.3"
5
5
  CODE_NAME = "Taylor Street"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.2
4
+ version: 0.18.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-30 00:00:00.000000000 Z
11
+ date: 2020-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport