htmljs-parser 2.11.2 → 2.11.3

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
@@ -2657,13 +2657,20 @@ class Parser extends BaseParser {
2657
2657
 
2658
2658
  char(ch, code) {
2659
2659
  var shorthand = currentPart;
2660
- if (!isConcise) {
2661
- if (code === CODE_CLOSE_ANGLE_BRACKET || code === CODE_FORWARD_SLASH) {
2662
- currentOpenTag.tagNameEnd = parser.pos;
2663
- endTagNameShorthand();
2664
- parser.rewind(1);
2665
- return;
2660
+ if (code === CODE_CLOSE_ANGLE_BRACKET && !isConcise) {
2661
+ currentOpenTag.tagNameEnd = parser.pos;
2662
+ endTagNameShorthand();
2663
+ parser.rewind(1);
2664
+ return;
2665
+ } else if (code === CODE_FORWARD_SLASH) {
2666
+ currentOpenTag.tagNameEnd = parser.pos;
2667
+ endTagNameShorthand();
2668
+ parser.rewind(1);
2669
+
2670
+ if (parser.lookAtCharCodeAhead(2) !== CODE_CLOSE_ANGLE_BRACKET) {
2671
+ parser.enterState(STATE_TAG_VAR);
2666
2672
  }
2673
+ return;
2667
2674
  }
2668
2675
 
2669
2676
  if (isWhitespaceCode(code)) {
package/package.json CHANGED
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "registry": "https://registry.npmjs.org/"
42
42
  },
43
- "version": "2.11.2"
43
+ "version": "2.11.3"
44
44
  }
@@ -1,14 +1,51 @@
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>
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 onclick=function(event) {
30
+ console.log("hello");
31
+ event.preventDefault();
32
+ }>
33
+ </foo>
34
+ text:"\n"
35
+ <foo onclick=function(event) {
36
+ console.log("hello");
37
+ event.preventDefault();
38
+ }>
39
+ </foo>
40
+ text:"\n"
41
+ <foo DEFAULT=function(event) {
42
+ console.log("hello");
43
+ event.preventDefault();
44
+ }>
45
+ </foo>
46
+ text:"\n"
47
+ <foo DEFAULT=function(event) {
48
+ console.log("hello");
49
+ event.preventDefault();
50
+ }>
51
+ </foo>
@@ -36,3 +36,8 @@ text:"\n"
36
36
  text:"\n"
37
37
  <div VAR=(ref) SELF_CLOSED>
38
38
  </div>
39
+ text:"\n"
40
+ text:"\n"
41
+ <div VAR=(ref) shorthandId="ab" shorthandClassNames=["cd"] SELF_CLOSED>
42
+ </div>
43
+ text:"\n"
@@ -16,4 +16,6 @@
16
16
  </>
17
17
 
18
18
  <div/ref/>
19
- <div/ref />
19
+ <div/ref />
20
+
21
+ <div#ab.cd/ref/>