-
Notifications
You must be signed in to change notification settings - Fork 665
define the part of code to submit #418
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
Comments
So each time we will extract out the content between the special tag comments, save it to a temp file and submit through CLI. Another usage for this tag is to provide a better place to put the Code Lens (issue #407 ). Currently the Code Lens is always put at the end of the file. @magic-akari Would you like to contribute for this? I guess we need also update the template here: https://github.com/leetcode-tools/leetcode-cli/tree/master/templates |
I tried to make a prototype here leetcode-tools/leetcode-cli#23 |
Thanks, I just left some comments there. |
I have a python script that does it better. It does the following things:
The most straight forward way to do this is to define a Let me know if you would like to make this a multi-language script. Right now what is missing is the ability to catch failed cases and convert it to appropriate types in the language. However, this is easily achievable if you are willing to use some Haskell or Ocaml to do pattern match! |
Thank you @jasonsun0310 , So far the problem is addressed in leetcode-tools/leetcode-cli#23. Let's see if the users need more powerful support later... |
🚀 Feature Proposal
We need a magic comment to define where is the actual user code to submit.
Motivation
I am playing with rust. The code structure is as follow.
look at the first line(Line 9).
I will get an error in vs code without that line.
And I will get an error if I submit code with that line.
The Line 54 is at LeetCode test side.
It is better to define which is the actual user code to submit and which is not.
For example:
The text was updated successfully, but these errors were encountered: