Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cubing.js issue] tabulations for indentation break things #337

Open
bgoglin opened this issue Sep 24, 2024 · 5 comments
Open

[cubing.js issue] tabulations for indentation break things #337

bgoglin opened this issue Sep 24, 2024 · 5 comments
Labels
🐞 bug Something isn't working

Comments

@bgoglin
Copy link

bgoglin commented Sep 24, 2024

Steps to reproduce the issue

Hello.
This poorly indented code works fine (only spaces before non-first lines of the alg)

     <twisty-player
       alg="R // on monte la face de droite
       U // on tourne le haut vers la gauche
       R' // on baisse la face de droite
       U' // on ramène le haut vers la droite"
       experimental-setup-anchor="end"></twisty-player>

This properly indented code doesn't work (there is a tab and some spaces before non-first lines of the alg)

     <twisty-player
       alg="R // on monte la face de droite
	    U // on tourne le haut vers la gauche
	    R' // on baisse la face de droite
	    U' // on ramène le haut vers la droite"
       experimental-setup-anchor="end"></twisty-player>

Observed behaviour

Buttons are greyed out depending on the indentation.

🖼 Screenshots

No response

Expected behaviour

Indentation should be ignored.

Environment

Firefox and Chrome on Linux.

Additional info

That's not an important issue, but it looks very strange. Thanks for this stuff anyway, it's really wondering for explaining things to beginners.

@bgoglin bgoglin added the 🐞 bug Something isn't working label Sep 24, 2024
@bgoglin bgoglin changed the title [cubing.js issue] some indentations break things [cubing.js issue] tabulations for indentation break things Sep 24, 2024
@bgoglin
Copy link
Author

bgoglin commented Sep 24, 2024

Looks like it's related to the tabulation character

@lgarron
Copy link
Member

lgarron commented Sep 27, 2024

Hmm, yeah, we purposely support spaces for whitepsace right now. If we get a lot of feedback about this I think that wouldn't necessarily be too hard but we'd have to think carefully about implications for https://standards.cubing.net/draft/6/sign-lgn-notation/

I'll leave this issue open for at least adding a more helpful warning.

If you remove the tabs from you code, any proper HTML formatter should avoid introducing them at least.

@lgarron
Copy link
Member

lgarron commented Sep 27, 2024

I'll leave this issue open for at least adding a more helpful warning.

Actually, I'm gonna generalize this into another issue.

@lgarron
Copy link
Member

lgarron commented Sep 27, 2024

Closing in favor of #338

@bgoglin
Copy link
Author

bgoglin commented Sep 27, 2024

Thanks, I've indeed configured my editor to avoid tabs entirely since then. But debugging the issue was very strange at the beginning. Help messages would certainly be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants