htmljs-parser 2.11.1 → 2.11.2

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/Parser.js CHANGED
@@ -2198,7 +2198,13 @@ class Parser extends BaseParser {
2198
2198
  openTagEOL();
2199
2199
  }
2200
2200
  return;
2201
- } else if (currentPart.parentState === STATE_TAG_NAME) {
2201
+ } else if (
2202
+ currentPart.parentState === STATE_TAG_NAME ||
2203
+ (isConcise && (
2204
+ currentPart.parentState === STATE_TAG_ARGS ||
2205
+ currentPart.parentState === STATE_WITHIN_OPEN_TAG)
2206
+ )
2207
+ ) {
2202
2208
  currentPart.endPos = parser.pos;
2203
2209
  endExpression();
2204
2210
 
package/package.json CHANGED
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "registry": "https://registry.npmjs.org/"
42
42
  },
43
- "version": "2.11.1"
43
+ "version": "2.11.2"
44
44
  }
@@ -1,40 +1,14 @@
1
- <foo onclick=function(event) {
2
- console.log("hello");
3
- event.preventDefault();
4
- } SELF_CLOSED>
5
- </foo>
6
- text:"\n"
7
- text:"\n"
8
- <foo onclick=function(event) {
9
- console.log("hello");
10
- event.preventDefault();
11
- } SELF_CLOSED>
12
- </foo>
13
- text:"\n"
14
- text:"\n"
15
- <foo DEFAULT=function(event) {
16
- console.log("hello");
17
- event.preventDefault();
18
- } SELF_CLOSED>
19
- </foo>
20
- text:"\n"
21
- text:"\n"
22
- <foo DEFAULT=function(event) {
23
- console.log("hello");
24
- event.preventDefault();
25
- } SELF_CLOSED>
26
- </foo>
27
- text:"\n"
28
- text:"\n"
29
- <foo VAR=(bar) DEFAULT=function(event) {
30
- console.log("hello");
31
- event.preventDefault();
32
- } SELF_CLOSED>
33
- </foo>
34
- text:"\n"
35
- text:"\n"
36
- <foo VAR=(bar) DEFAULT=function(event) {
37
- console.log("hello");
38
- event.preventDefault();
39
- } SELF_CLOSED>
40
- </foo>
1
+ <let VAR=(count) DEFAULT=0>
2
+ </let>
3
+ <effect DEFAULT=function() {
4
+ const interval = setInterval(() => {
5
+ count += 1
6
+ }, 1000);
7
+ return () => clearInterval(interval)
8
+ }>
9
+ </effect>
10
+ <div>
11
+ text:"The count is "
12
+ ${"$escapeXml(count)"}
13
+ text:"!"
14
+ </div>
@@ -18,12 +18,22 @@
18
18
  event.preventDefault();
19
19
  }/>
20
20
 
21
- <foo/bar(event) {
21
+ foo onclick(event) {
22
22
  console.log("hello");
23
23
  event.preventDefault();
24
- }/>
24
+ }
25
+
26
+ foo onclick (event) {
27
+ console.log("hello");
28
+ event.preventDefault();
29
+ }
30
+
31
+ foo(event) {
32
+ console.log("hello");
33
+ event.preventDefault();
34
+ }
25
35
 
26
- <foo/bar (event) {
36
+ foo (event) {
27
37
  console.log("hello");
28
38
  event.preventDefault();
29
- }/>
39
+ }