Closed
Description
🐛 Bug Report
Before 0.14.0 when I started a new problem the instructions would be in the new problem file commented out. But now I don't get the description in the problem's comments. I just get something like this without the description
/*
* @lc app=leetcode id=35 lang=javascript
*
* [35] Search Insert Position
*/
/**
* @param {number[]} nums
* @param {number} target
* @return {number}
*/
var searchInsert = function(nums, target) {
};
To Reproduce
Start any problem from the sidenav.
Expected behavior
The problems should include the description.
Extension Output
/*
* @lc app=leetcode id=35 lang=javascript
*
* [35] Search Insert Position
*/
/**
* @param {number[]} nums
* @param {number} target
* @return {number}
*/
var searchInsert = function(nums, target) {
};
[35] Search Insert Position
https://leetcode.com/problems/search-insert-position/description/
Tags: algorithms array binary-search
Langs: c cpp csharp golang java javascript kotlin php python python3 ruby rust scala swift
* algorithms
* Easy (40.67%)
* Likes: 1225
* Dislikes: 170
* Total Accepted: 386.1K
* Total Submissions: 948.8K
* Testcase Example: '[1,3,5,6]\n5'
<p>Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.</p>
<p>You may assume no duplicates in the array.</p>
<p><strong>Example 1:</strong></p>
<pre>
<strong>Input:</strong> [1,3,5,6], 5
<strong>Output:</strong> 2
</pre>
<p><strong>Example 2:</strong></p>
<pre>
<strong>Input:</strong> [1,3,5,6], 2
<strong>Output:</strong> 1
</pre>
<p><strong>Example 3:</strong></p>
<pre>
<strong>Input:</strong> [1,3,5,6], 7
<strong>Output:</strong> 4
</pre>
<p><strong>Example 4:</strong></p>
<pre>
<strong>Input:</strong> [1,3,5,6], 0
<strong>Output:</strong> 0
</pre>
Your Environment
- os: macOS
- extension settings:
{
"leetcode.defaultLanguage": "javascript",
"leetcode.showLocked": true,
"leetcode.enableStatusBar": false,
"leetcode.enableShortcuts": false
}
- nodejs version: 10.15.1
- vscode version: 1.33.1
- extension version: 0.14.0
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
Vigilans commentedon Apr 22, 2019
We now rely on the preview panel to show problem description with better user experience:
Is there some reason for you to rely on the comment to provide description?
donifer commentedon Apr 22, 2019
I normally have my problems in a repo and in my use case its nice to have the description in the file itself for future reference.
I can see myself going back to the problems a few years from now, maybe outside of vscode, and it would be nice to still have the description easily available.
Having an opt-in option to add the description to the file would be awesome!
Vigilans commentedon Apr 22, 2019
I see. Will be back in next version.
jdneo commentedon Apr 23, 2019
@Vigilans
Since this is a breaking change we have introduced, how about we implement this and quickly release the
0.14.1
as a hotfix?Vigilans commentedon Apr 23, 2019
Yes, I'm currently working on it (to provide an opt-in option)
jdneo commentedon Apr 23, 2019
@Vigilans Great! Thanks.
showCommentDescription
config #289juyse commentedon Apr 24, 2019
Also there should be easier way to access preview panel when re-open the code file, something similar to the "submit" button ?
jdneo commentedon Apr 24, 2019
@juyse This is tracked by #286
rockyzhang24 commentedon Apr 27, 2019
When will you release 0.14.1 approximately? Is it possible to first release a version that at least supports this opt-in option to add descriptions in the problem's comment? Very desperate. Thanks a lot.
7 remaining items