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

#278: Add quotation marks around the variable name to support spaces #279

Merged
merged 2 commits into from
Jul 30, 2021

Conversation

martin-fleck-at
Copy link
Contributor

No description provided.

@WebFreak001
Copy link
Owner

just quoting them might leave quotation marks in, that will cause the parsing to fail + this behavior could change existing other MI debuggers.

I think it would be best if you can create a function that quotes variables and calls escape on the content only if the variables have content that needs to be quoted/escaped (spaces and special characters)

@martin-fleck-at martin-fleck-at force-pushed the issue-278 branch 3 times, most recently from 2353468 to 8e723ac Compare July 29, 2021 11:53
@martin-fleck-at
Copy link
Contributor Author

@WebFreak001 Thank you for your fast reply, I really appreciate it!

I extracted the quoting into a function and use escape with surrounding double quotes. Escaping + double quotes is already used in several other places within the class, so I hope that is fine. For now I only do it if we encounter whitespaces which is enough for our use case but I don't know the parsing well enough to know if there are other characters that might break it as well. If you think we should check for more, please let me know.

Adds more than just whitespace to escape condition
@WebFreak001
Copy link
Owner

I changed the regex a bit but didn't actually test how it affects the debugging, can you verify if it still works as expected with your issue?

@martin-fleck-at
Copy link
Contributor Author

@WebFreak001 I double checked with our use case and everything still works, fantastic, thank you!

@WebFreak001 WebFreak001 merged commit 5151db0 into WebFreak001:master Jul 30, 2021
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 this pull request may close these issues.

2 participants