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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/lm_docstache/renderer.rb +8 -9
- data/lib/lm_docstache/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: 57e0a2746e8e2f7261ad8dfab45df81cac8a68c4fd1f0135f23f40459d40d575
|
4
|
+
data.tar.gz: 4351b0fc8655c7fe9aeb3beafd4ce6e94f43aac8ebef92409eb4bb49b8f730a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10cbbb411604889184e841b04379c88999ba87ddd0e69fead3e0cd813064e597c9c892abbb6b51e9c177410d39612178cbbe433637c83c680b206226b81e7cb6
|
7
|
+
data.tar.gz: 14bbb0acc59a60a66293001a47e7b7846926d68447395f0011f34d9e1fd443b1f5c2784daac6efb62814f48739c39bd0d20a03083190261b5806b50f424b557e
|
data/CHANGELOG.md
CHANGED
@@ -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(@
|
14
|
-
remove_role_tags
|
15
|
-
|
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
|
-
|
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(
|
109
|
-
|
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
|
122
|
-
|
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
|
data/lib/lm_docstache/version.rb
CHANGED