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

Custom blocks import "@" in the label as "\@" #1307

Open
towerofnix opened this issue Jul 7, 2018 · 3 comments
Open

Custom blocks import "@" in the label as "\@" #1307

towerofnix opened this issue Jul 7, 2018 · 3 comments

Comments

@towerofnix
Copy link
Contributor

towerofnix commented Jul 7, 2018

Expected Behavior

Imported custom blocks should have "@" characters exactly as they are.

Actual Behavior

"@" characters are replaced with "\@".

I can edit the custom block and replace the "\@" with "@", so I don't think this is an issue in scratch-blocks (i.e. scratch-blocks can display "@" characters fine, the problem is they're not being imported from 2.0 projects correctly).

Steps to Reproduce

Create a 2.0 project with a custom block that has "@" in the label.

I noticed the issue in this project: https://scratch.mit.edu/projects/150986523/ (See blocks like "3d position @ x y z focal").

Operating System and Browser

Firefox 62.0b6, Debian (testing).

@Kenny2github
Copy link
Contributor

note: in the post when you type \@ it appears as @ anyway lol

@towerofnix
Copy link
Contributor Author

@Kenny2github Oops fixed :P

@joker314
Copy link
Contributor

joker314 commented Aug 9, 2018

The project.json contains a \, I believe to avoid ambiguities about the @ symbol's special meaning (like @greenFlag). However, in Scratch 3.0, this doesn't appear to be done.

Based on the escape function in scratch-flash, I believe only the \, %, and @ characters are escaped, and are the only ones which need to be unescaped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants