@cocreate/render 1.24.6 → 1.24.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/CoCreate.config.js +3 -2
- package/package.json +1 -1
- package/src/index.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.24.8](https://github.com/CoCreate-app/CoCreate-render/compare/v1.24.7...v1.24.8) (2023-05-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* removed debug code ([26077a8](https://github.com/CoCreate-app/CoCreate-render/commit/26077a869c95d304218bb6a0e92c413cfe99cc6f))
|
|
7
|
+
|
|
8
|
+
## [1.24.7](https://github.com/CoCreate-app/CoCreate-render/compare/v1.24.6...v1.24.7) (2023-05-01)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* issue with two or more placeholders rendering ([5db3937](https://github.com/CoCreate-app/CoCreate-render/commit/5db3937b142f37d565a30c1cd882cda39fb76133))
|
|
14
|
+
|
|
1
15
|
## [1.24.6](https://github.com/CoCreate-app/CoCreate-render/compare/v1.24.5...v1.24.6) (2023-05-01)
|
|
2
16
|
|
|
3
17
|
|
package/CoCreate.config.js
CHANGED
|
@@ -17,9 +17,10 @@ module.exports = {
|
|
|
17
17
|
"general.cocreate.app"
|
|
18
18
|
],
|
|
19
19
|
"directory": "/docs/render",
|
|
20
|
-
"
|
|
20
|
+
"parentDirectory": "{{parentDirectory}}",
|
|
21
|
+
"content-type": "{{content-type}}",
|
|
21
22
|
"public": "true",
|
|
22
|
-
"website_id": "
|
|
23
|
+
"website_id": "644d4bff8036fb9d1d1fd69c"
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
]
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -57,7 +57,7 @@ const CoCreateRender = {
|
|
|
57
57
|
},
|
|
58
58
|
|
|
59
59
|
__replaceValue: function(data, inputValue, renderKey, el) {
|
|
60
|
-
let outputValue =
|
|
60
|
+
let outputValue = inputValue;
|
|
61
61
|
let placeholders = inputValue.match(/{{([A-Za-z0-9_.,\[\]\- ]*)}}/g);
|
|
62
62
|
if (placeholders) {
|
|
63
63
|
for (let placeholder of placeholders) {
|
|
@@ -67,7 +67,7 @@ const CoCreateRender = {
|
|
|
67
67
|
if (typeof(value) == "object")
|
|
68
68
|
value = this.generateString(value)
|
|
69
69
|
|
|
70
|
-
outputValue =
|
|
70
|
+
outputValue = outputValue.replace(placeholder, value);
|
|
71
71
|
} else if (renderKey && placeholder.includes(`{{${renderKey}.`)) {
|
|
72
72
|
outputValue = '';
|
|
73
73
|
}
|