Skip to content

Commit

Permalink
tweaked dropdown-menu parser
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoenig committed Dec 18, 2024
1 parent 57eafb1 commit a08b1c4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## in development:

### 2024-12-18
* byob: tweaked dropdown-menu parser

## 10.3.3:
* **Translation Updates:**
* Japanese and Spanish
Expand Down
2 changes: 1 addition & 1 deletion snap.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<script src="src/gui.js?version=2024-12-12"></script>
<script src="src/paint.js?version=2023-05-24"></script>
<script src="src/lists.js?version=2024-11-14"></script>
<script src="src/byob.js?version=2024-12-04"></script>
<script src="src/byob.js?version=2024-12-18"></script>
<script src="src/tables.js?version=2023-08-17"></script>
<script src="src/sketch.js?version=2023-05-24"></script>
<script src="src/video.js?version=2019-06-27"></script>
Expand Down
7 changes: 6 additions & 1 deletion src/byob.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ ArgLabelMorph, embedMetadataPNG, ArgMorph, RingMorph, InputList*/

// Global stuff ////////////////////////////////////////////////////////

modules.byob = '2024-December-04';
modules.byob = '2024-December-18';

// Declarations

Expand Down Expand Up @@ -478,6 +478,11 @@ CustomBlockDefinition.prototype.parseChoices = function (string) {
val = [val.slice(2)];
}
if (isNil(val)) {
if (key === '~') {
key = '~'.repeat(
Object.keys(dict).filter(each => each.startsWith('~')
).length + 1);
}
dict[key] = key;
} else {
dict[key] = val;
Expand Down

0 comments on commit a08b1c4

Please sign in to comment.