Skip to content

Commit

Permalink
build with non-buggy minify
Browse files Browse the repository at this point in the history
  • Loading branch information
fuhrmanator committed Sep 15, 2024
1 parent 9375585 commit eb95748
Show file tree
Hide file tree
Showing 10 changed files with 1,153 additions and 1,815 deletions.
20 changes: 17 additions & 3 deletions docs/editor/lib/GIFT.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,24 @@ Choice "Choice"
return choice }

Weight "(weight)"
= '%' percent:([-]? PercentValue) '%' { return parseFloat(percent.join('')) }

= '%' percent:(PercentValue) '%' {
return percent;
}

PercentValue "(percent)"
= '100' / [0-9][0-9]?[.]?[0-9]* { return text() }
= percent:(!'%' .)* {
let error = 'a value between -100 and 100'
console.log(percent.length)
if (percent.length == 0) expected(error + ' (did you forget to put a value?)');
// the !'%' shows up as a 0th element in the percent array (of arrays), so we have to join the 1th elements
const pct = parseFloat(percent.map(innerArray => innerArray[1]).join(""));
console.log(pct)
if (pct >= -100 && pct <= 100) {
return pct;
} else {
expected(error)
}
}

Feedback "(feedback)"
= '#' !'###' _ feedback:RichText? { return feedback }
Expand Down
733 changes: 361 additions & 372 deletions lib/gift-parser-globals.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/gift-parser-globals.min.js

Large diffs are not rendered by default.

733 changes: 361 additions & 372 deletions lib/gift-parser-globalsJS.html

Large diffs are not rendered by default.

733 changes: 361 additions & 372 deletions lib/gift-parser.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/gift-parser.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit eb95748

Please sign in to comment.