lm_docstache 1.3.6 → 1.3.7

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: b567be3ca4cce946229c4c8789020b0227df47e673ed4f116068b1a00fe76da8
4
- data.tar.gz: 7e3651c7b2ca2b82b3401c05010287cac3c879b30fdbe1376c7b2ea864f62b64
3
+ metadata.gz: 57e0a2746e8e2f7261ad8dfab45df81cac8a68c4fd1f0135f23f40459d40d575
4
+ data.tar.gz: 4351b0fc8655c7fe9aeb3beafd4ce6e94f43aac8ebef92409eb4bb49b8f730a9
5
5
  SHA512:
6
- metadata.gz: a586d0749ed0e5311ba945dd40754acbc4c2ae21506ff9ad82e8f898ae824be7f3f3f34df1f4e1a66e3ebfeb2d7ffc878fc56c707fe45683a4611d0671f0b8ca
7
- data.tar.gz: 5d6e637b9d0a0ea496eed4e0e842d139afe9ec5df671574b34e45a9e24da1e4267f6d02d0f5cf37dea504c53ceeb5b00c024e41af41153f14a8501b662346e44
6
+ metadata.gz: 10cbbb411604889184e841b04379c88999ba87ddd0e69fead3e0cd813064e597c9c892abbb6b51e9c177410d39612178cbbe433637c83c680b206226b81e7cb6
7
+ data.tar.gz: 14bbb0acc59a60a66293001a47e7b7846926d68447395f0011f34d9e1fd443b1f5c2784daac6efb62814f48739c39bd0d20a03083190261b5806b50f424b557e
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.7
4
+ * Fix bug on renderer returning invalid data.
5
+ * Refactor Renderer Class remove_role_tags method to standardize, following other remove methods.
6
+
3
7
  ## 1.3.6
4
8
  * Change remove signature tags to be remove role tags.
5
9
  * Fix method remove role tags to be following the new regexp rules.
@@ -10,9 +10,9 @@ module LMDocstache
10
10
 
11
11
  def render
12
12
  find_and_expand_blocks
13
- replace_tags(@content, @data)
14
- remove_role_tags(@content) if @remove_role_tags
15
- return @content
13
+ replace_tags(@data)
14
+ remove_role_tags if @remove_role_tags
15
+ @content
16
16
  end
17
17
 
18
18
  def render_replace(text)
@@ -21,7 +21,7 @@ module LMDocstache
21
21
  text_el.content = text
22
22
  end
23
23
  end
24
- return @content
24
+ @content
25
25
  end
26
26
 
27
27
  private
@@ -105,8 +105,8 @@ module LMDocstache
105
105
  end
106
106
  end
107
107
 
108
- def replace_tags(elements, data)
109
- elements.css('w|t').each do |text_el|
108
+ def replace_tags(data)
109
+ @content.css('w|t').each do |text_el|
110
110
  if !(results = text_el.text.scan(/\{\{([\w\.\|]+)\}\}/).flatten).empty?
111
111
  rendered_string = text_el.text
112
112
  results.each do |r|
@@ -115,11 +115,10 @@ module LMDocstache
115
115
  text_el.content = rendered_string
116
116
  end
117
117
  end
118
- return elements
119
118
  end
120
119
 
121
- def remove_role_tags(elements)
122
- elements.css('w|p').each do |text_el|
120
+ def remove_role_tags
121
+ @content.css('w|p').each do |text_el|
123
122
  results = text_el.text.scan(Document::ROLES_REGEXP)
124
123
  unless results.empty?
125
124
  rendered_string = text_el.text
@@ -1,3 +1,3 @@
1
1
  module LMDocstache
2
- VERSION = "1.3.6"
2
+ VERSION = "1.3.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lm_docstache
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roey Chasman