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

Files created in with the java option contain invalid characters #290

Closed
DO-Ui opened this issue Sep 5, 2022 · 2 comments · Fixed by #291
Closed

Files created in with the java option contain invalid characters #290

DO-Ui opened this issue Sep 5, 2022 · 2 comments · Fixed by #291

Comments

@DO-Ui
Copy link
Contributor

DO-Ui commented Sep 5, 2022

When I try and create a new file on most problems in DMOJ, the auto-generated filenames include characters that are invalid for the class.
image
image

Example of a problem that causes this: https://dmoj.ca/problem/ioi09p5

Extension Version: 2.36.1

VS Code Version: 1.170.1

Browser Version: Opera 88.0.4412.74 (Chromium major version: 102)

Operating System: Pop!_OS 22.04 LTS x86_64 GNOME desktop

CPH.error.mp4
@unfixedbug
Copy link

did you get any fix for the same

@DO-Ui
Copy link
Contributor Author

DO-Ui commented Sep 14, 2022

Update: I found a temporary fix, this line in the code has regex that matches - which is not allowed in Java class names. I haven't tested if this would have adverse affects in other languages or problems but by removing the - from /[\p{L}-]+|[0-9]+/gu I was able to solve the issue. I may experiment with this further and open a pull request.

DO-Ui added a commit to DO-Ui/cph that referenced this issue Sep 14, 2022
agrawal-d pushed a commit that referenced this issue Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants