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

Fix escape string from causing syntax error (#630) #631

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

imbellish
Copy link

@imbellish imbellish commented Apr 1, 2020

@imbellish
Copy link
Author

🤦‍♂

@cclauss
Copy link
Contributor

cclauss commented Apr 1, 2020

Clicking on the failed tests...

./web/debugerror.py:95:46: W605 invalid escape sequence '\-'
        strClassName = strClassName.replace(/\-/g, "\\-");
                                             ^
1     W605 invalid escape sequence '\-'
1
##[error]Process completed with exit code 1

@cclauss cclauss added this to the 1.0 milestone Apr 1, 2020
@imbellish
Copy link
Author

@cclauss I couldn't find the original commit for this template, last I checked, in the OG django logs. And I think there's more work to do here to support python>=3.5 but not python <=2.7.

@cclauss
Copy link
Contributor

cclauss commented Apr 1, 2020

Hint:
$ python

>>> "my string".replace(/\-/g, "\\-")
  File "<string>", line 1
    "my string".replace(/\-/g, "\\-")
                        ^
SyntaxError: invalid syntax

@teebee
Copy link

teebee commented Apr 1, 2020

Why is

strClassName = strClassName.replace(/\-/g, "\\-");
needed at all? A dash is only special inside a [...]. Am I missing something?

@teebee
Copy link

teebee commented Apr 1, 2020

It seems that flake8 is used to check JavaScript code here ...

@iredmail
Copy link
Contributor

iredmail commented Jun 5, 2020

@cclauss Do i remember correctly that this issue had been fixed in some other commit? Can we close this PR now?

@cclauss
Copy link
Contributor

cclauss commented Jul 25, 2020

I believe that this is fixed in the current releases. Can you please retest on v0.6x and let us know if we can close this issue?

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

Successfully merging this pull request may close these issues.

None yet

4 participants