cubing.js icon indicating copy to clipboard operation
cubing.js copied to clipboard

Space needed between algorithm and code

Open rokicki opened this issue 2 years ago • 2 comments

Steps to reproduce the issue

Visit the URL:

https://alpha.twizzle.net/explore/?alg=U+F+R%2F%2F+comment

Observed behaviour

The algorithm and comment are completely ignored and the URL is rewritten to drop these args.

🖼 Screenshots

No response

Expected behaviour

A space should not be required before a comment.

Browser & operating system

Chrome on MacOS

Additional info

(Found by Christopher Mowla; turned into an issue by Tom.)

rokicki avatar Nov 17 '23 01:11 rokicki

It looks like this is about two separate things?

  • We require whitespace between alg nodes. I want to keep this the same — mandatory whitespace sets a much better interoperability baseline for all other apps.
  • Twizzle Explorer ignores invalid URL alg parameters — we can consider showing an error message.

lgarron avatar Nov 17 '23 02:11 lgarron

In almost all programming languages I am familiar with, comments are a syntactic construct not requiring whitespace separation. Requiring whitespace before a comment (or after a closing block comment) violates least surprise and looks very much like a bug.

On Thu, Nov 16, 2023 at 6:40 PM Lucas Garron @.***> wrote:

It looks like this is about two separate things?

  • We require whitespace between alg nodes. I want to keep this the same — mandatory whitespace sets a much better interoperability baseline for all other apps.
  • Twizzle Explorer ignores invalid URL alg parameters — we can consider showing an error message.

— Reply to this email directly, view it on GitHub https://github.com/cubing/cubing.js/issues/303#issuecomment-1815660468, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMOLSZOQNQ75A53XCHHNQ3YE3FAJAVCNFSM6AAAAAA7PCP34WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJVGY3DANBWHA . You are receiving this because you authored the thread.Message ID: @.***>

--

rokicki avatar Nov 17 '23 07:11 rokicki