@peter.naydenov/morph 1.0.3 → 1.1.0
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 +7 -2
- package/package.json +1 -1
- package/src/methods/_readTemplate.js +7 -1
package/Changelog.md
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
## Release History
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
### 1.1.0 ( 2025-01-19 )
|
|
5
|
+
- [x] Ignore html comment sections in templates;
|
|
6
|
+
|
|
7
|
+
|
|
4
8
|
|
|
5
9
|
### 1.0.3 (2025-01-10)
|
|
6
|
-
- [x] Fix:
|
|
10
|
+
- [x] Fix: Action should receive dependencies when data is a function;
|
|
7
11
|
|
|
8
12
|
|
|
9
13
|
|
|
10
14
|
### 1.0.2 (2025-01-09)
|
|
11
15
|
- [x] Fix: Render nested components;
|
|
12
|
-
- [
|
|
16
|
+
- [x] Refactoring: Placeholder with actions when data is a function;
|
|
17
|
+
- [ ] Bug: Action should receive dependencies when data is a function;
|
|
13
18
|
|
|
14
19
|
|
|
15
20
|
|
package/package.json
CHANGED
|
@@ -16,8 +16,14 @@ function _readTemplate ( tpl ) {
|
|
|
16
16
|
, placeholders = []
|
|
17
17
|
;
|
|
18
18
|
|
|
19
|
+
// Remove from template all html comments and multiple spaces
|
|
20
|
+
const Thetemplate = (typeof template === 'string') ? template
|
|
21
|
+
.replace(/<!--[\s\S]*?-->/g, '')
|
|
22
|
+
.replace ( /\s{2,}/g, ' ' )
|
|
23
|
+
: template
|
|
24
|
+
|
|
19
25
|
let hasError = null;
|
|
20
|
-
const chop = _chopTemplate (settings)(
|
|
26
|
+
const chop = _chopTemplate (settings)( Thetemplate );
|
|
21
27
|
|
|
22
28
|
if ( typeof chop === 'string' ) hasError = chop
|
|
23
29
|
else {
|