-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Project Converter: Do not convert lines that start with a comment #74193
Project Converter: Do not convert lines that start with a comment #74193
Conversation
dc8f07b
to
964add1
Compare
Would it be too risky / lead to false positives to make the regex handle inline comments? At least for GDScript, I think it might be safe to assume that
Might be a bit hard to make fully reliable as strings are messy, so maybe we could just match:
|
There is a little risk, as you also wrote. If we want to support inline comments, the logic needs to be further improved to separate the line into a code and a comment part. |
964add1
to
3eb7976
Compare
3eb7976
to
5669590
Compare
Lines that start with # or // are ignored
5669590
to
8cf7ac3
Compare
Thanks! |
Cherry-picked for 4.0.1. |
Partially fixes: - #66061
Partially fixes: - #70983
This PR adds detection of lines that start with a comment.
Those lines are ignored so that the text inside the comments remains untouched.
E.g.
# Reference
is not converted to# RefCounted
.Lines that do not start with a comment, e.g.
func _ready(): # Reference
will still be converted.Same applies to C# comments:
// Reference