Skip to content

Commit

Permalink
0.9.10 release
Browse files Browse the repository at this point in the history
  • Loading branch information
1cg committed Aug 4, 2023
1 parent 13429a7 commit 11601cd
Show file tree
Hide file tree
Showing 131 changed files with 75,420 additions and 9 deletions.
16 changes: 12 additions & 4 deletions dist/_hyperscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,9 @@
peekToken(value, peek, type) {
peek = peek || 0;
type = type || "IDENTIFIER";
return this.tokens[peek] && this.tokens[peek].value === value && this.tokens[peek].type === type
if(this.tokens[peek] && this.tokens[peek].value === value && this.tokens[peek].type === type){
return this.tokens[peek];
}
}

/**
Expand Down Expand Up @@ -5526,9 +5528,15 @@
tokens.matchToken("then"); // optional 'then'
var trueBranch = parser.parseElement("commandList", tokens);
var nestedIfStmt = false;
if (tokens.matchToken("else") || tokens.matchToken("otherwise")) {
nestedIfStmt = tokens.peekToken("if");
var falseBranch = parser.parseElement("commandList", tokens);
let elseToken = tokens.matchToken("else") || tokens.matchToken("otherwise");
if (elseToken) {
let elseIfIfToken = tokens.peekToken("if");
nestedIfStmt = elseIfIfToken != null && elseIfIfToken.line === elseToken.line;
if (nestedIfStmt) {
var falseBranch = parser.parseElement("command", tokens);
} else {
var falseBranch = parser.parseElement("commandList", tokens);
}
}
if (tokens.hasMore() && !nestedIfStmt) {
tokens.requireToken("end");
Expand Down
2 changes: 1 addition & 1 deletion dist/_hyperscript.min.js

Large diffs are not rendered by default.

Binary file modified dist/_hyperscript.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripting",
"HTML"
],
"version": "0.9.9",
"version": "0.9.10",
"homepage": "https://hyperscript.org/",
"bugs": {
"url": "https://github.com/bigskysoftware/_hyperscript/issues"
Expand Down
2 changes: 1 addition & 1 deletion www/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ OK, let's get started with hyperscript!
Hyperscript is a dependency-free JavaScript library that can be included in a web page without any build step:

~~~ html
<script src="https://unpkg.com/hyperscript.org@0.9.9"></script>
<script src="https://unpkg.com/hyperscript.org@0.9.10"></script>
~~~

After you've done this, you can begin adding hyperscript to elements:
Expand Down
2 changes: 1 addition & 1 deletion www/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ on pointerdown
</div>


<div style="flex-basis: 100%; text-align: center;"><span id="install"><strong>Install:</strong> <code style="border: 2px dotted #00000055; margin: 0 10px; padding: 4px 6px; border-radius: 4px">&lt;script src="https://unpkg.com/hyperscript.org@0.9.9"&gt;&lt;/script&gt;</code>
<div style="flex-basis: 100%; text-align: center;"><span id="install"><strong>Install:</strong> <code style="border: 2px dotted #00000055; margin: 0 10px; padding: 4px 6px; border-radius: 4px">&lt;script src="https://unpkg.com/hyperscript.org@0.9.10"&gt;&lt;/script&gt;</code>
<button style="font:inherit;font-size:.8em;background:#3465a4;color:white;border:none;padding: 0 .4em; border-radius: .4em" _="on click
writeText(my previousElementSibling's innerText) on navigator.clipboard
put 'copied!' into me
Expand Down
2 changes: 1 addition & 1 deletion www/js/_hyperscript.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions www/test/0.9.10/dist/_hyperscript.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit 11601cd

Please sign in to comment.