Replace non-ASCII dashes in code & clarify patent/licensing terms for non-commercial use in README #3882
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This single PR addresses two separate issues:
Bugfix: Non-ASCII punctuation in crsclock.js
Installing via the Development App Loader produced parsing errors and garbled text, whereas uploading via Web IDE did not. After investigation, non-ASCII dashes in the source were being mangled by the Espruino minifier/firmware, causing:
Syntax error:
Uncaught SyntaxError: Got UNFINISHED REGEX expected ']'
(due to U+2212 MINUS SIGN in BT calibration menu, ≈ lines 612–614)
Mojibake:
EN DASH (U+2013) in the sleep-window and range prompts rendered as â on device (lines 84–86, 714 & 723)
Fix: Normalise all EN DASH and MINUS SIGN characters to the ASCII hyphen-minus (-).
Documentation: Patent & Licensing clarity in README.md
To reinforce transparency around our UK-patented method while preserving open-source accessibility, we’ve updated the Patent and Licensing section to:
Note that the patent does not require licensing for non-commercial, research, educational, or personal use within the open-source community.
Advise that commercial or broad distribution may require permission or licensing, and direct inquiries to the author.
Preserve the existing MIT-license wording intact.
Changes:
crsclock.js
Replaced all U+2013 (EN DASH) and U+2212 (MINUS SIGN) with - in menu labels and prompt strings.
crsclock.app.js (auto-generated)
Will now minify without regex errors.
README.md
Under Patent and Licensing, added a prominent “Note” about non-commercial use.
Clarified permitted use cases vs. those requiring further licensing.
Retained existing MIT license text unmodified.