-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Corrected the regex to detect espaced percent symbol. #139437
Conversation
Hey @KhaledSamir, I think your PR looks nice. But there is one thing I have to mention. Maybe you already considered the following, in that case just ignore me, I'm also pretty new to this repository 😊. Eventually there is a more experienced contributor who might clarify that or posts a link to a resource where the vscode tests are explained. In my research I figured out that this file extensions/vscode-colorize-tests/test/colorize-results/md-math_md.json When you are running the integration tests it takes your changes here extensions/vscode-colorize-tests/test/colorize-fixtures/md-math.md and generates the vscode editor output somehow and checks the output against the expected values in here extensions/vscode-colorize-tests/test/colorize-results/md-math_md.json If you change the behavior in highlighting you can simply run the integration tests and check if other highlighting is affected or not. After having no failures, just add your changes here extensions/vscode-colorize-tests/test/colorize-fixtures/md-math.md and run the integration test again. The tests will fail and automatically alter the vscode-colorize-tests/test/colorize-results/md-math_md.json file. Now you can run the tests again and they should pass and you can commit the changes. Long story short, I've this gut feeling that your changes break the integration tests. I'll checkout your PR tomorrow morning and check if the integration test are still running. P.S.: To execute the integration tests. You can do |
@Nopec Very good point, Andre! I actually didn't run the integration tests but I tests my changes in all default themes and it worked fine. But of course, this doesn't mean to avoid running the integration tests, so I tried to run them but I always get this error when I do: This error happens with test-integration or test.sh files. Are you getting the same or is it working for you? |
@KhaledSamir No, I didn't encounter your problem. I made a new devcontainer using your forked repository, checked out the corresponding branch As I expect I'm getting this error: I copied the whole output to this file: After failing I get these unstaged changes: Feel free to download this patch, apply it to your branch and amend the commit.
If you did so, I will checkout your changes and try again to execute the integration tests. |
You also have to adjust your PR description, you need to write \\% to get \%. Now your text is a little bit confusing. |
Hello, I saw that my diff link was expired. So, here is a permanent one: https://diffy.org/diff/a729be820ce1d @KhaledSamir You have any updates regarding fixing the integration tests? If you struggle, I could create a pull request to your fork if you want. Then we'll see what happens. Just, let me know. |
Hi @Nopec, Thank you so much for helping with the PR, am actually travelling now and would be hard for me to do that until Friday or maybe tomorrow. Could you please help with a PR to my fork repo? |
@KhaledSamir sure, I'll do so tomorrow. Stay safe! |
@KhaledSamir Unfortunately, I'm not able to create such a PR. You might give me access to your fork, so I'd be able to extend your PR. On the other hand, I think it is not a problem to wait until Friday or even longer. Have a wonderful Christmas! 🎄 |
@Nopec Unfortunately, still am getting the same error "dirname path" but I gave you access to my fork. Could you please update the file and ran the integration tests again? |
1b65c4b
to
6c8168e
Compare
@KhaledSamir I updated the test expectation values and rebased this branch to the latest main. The |
6c8168e
to
3da81c4
Compare
@Nopec Thank you, Andre! :) I'll try to fix this issue that I'm facing whenever I ran the integration tests script. Let's wait for the reviews now 💯 |
Thanks! The change looks good to me. Will be in the next insiders build and is scheduled for VS Code 1.64 |
This PR fixes #138921. The fix is correcting the regex that was being used for inline comment.
"%" should comment an inline comment but "%" should escape and treat the text if you write % along with a text after it. Example:
$$ % This is comment $$
Rendered as empty space.
$$ % Show this text $$
Rendered as "%Showthistext"
How to test