diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 91c0d2d5..f74ca51f 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -5,8 +5,10 @@ A big thanks to the following individuals for contributing: - [@purocean](https://github.com/purocean) for contributing [#46](https://github.com/jdneo/vscode-leetcode/pull/46) - [@Xeonacid](https://github.com/Xeonacid) for contributing [#58](https://github.com/jdneo/vscode-leetcode/pull/58). - [@Himself65](https://github.com/Himself65) for contributing [#61](https://github.com/jdneo/vscode-leetcode/pull/61) -- [@Vigilans](https://github.com/Vigilans) for contributing [#94](https://github.com/jdneo/vscode-leetcode/pull/94) +- [@Vigilans](https://github.com/Vigilans) for contributing [#94](https://github.com/jdneo/vscode-leetcode/pull/94), [#193](https://github.com/jdneo/vscode-leetcode/pull/193) - [@ringcrl](https://github.com/ringcrl) for contributing [#123](https://github.com/jdneo/vscode-leetcode/pull/123) - [@pujiaxun](https://github.com/pujiaxun) for contributing [#143](https://github.com/jdneo/vscode-leetcode/pull/143) - [@edvardchen](https://github.com/edvardchen) for contributing [#147](https://github.com/jdneo/vscode-leetcode/pull/147) - [@poppinlp](https://github.com/poppinlp) for contributing [#149](https://github.com/jdneo/vscode-leetcode/pull/149), [#171](https://github.com/jdneo/vscode-leetcode/pull/171), [#175](https://github.com/jdneo/vscode-leetcode/pull/175) +- [@xuzaixian](https://github.com/xuzaixian) for contributing [#186](https://github.com/jdneo/vscode-leetcode/pull/186) +- [@ZainChen](https://github.com/ZainChen) for contributing [#197](https://github.com/jdneo/vscode-leetcode/pull/197) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3265517..834a266d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to the "leetcode" extension will be documented in this file. Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. +## [0.13.0] +## Added +- Preview the problem description [#131](https://github.com/jdneo/vscode-leetcode/issues/131) +- Show top voted solution [#193](https://github.com/jdneo/vscode-leetcode/pull/193) +- Add `collapse all` for the explorer [#197](https://github.com/jdneo/vscode-leetcode/pull/197) + +## Fixed +[Bugs fixed](https://github.com/jdneo/vscode-leetcode/issues?q=is%3Aissue+is%3Aclosed+milestone%3A0.13.0+label%3Abug) + ## [0.12.0] ## Added - Add new command `LeetCode: Switch Default Language` to support switching the default language [#115](https://github.com/jdneo/vscode-leetcode/issues/115) diff --git a/README.md b/README.md index 5995d759..fc09cb67 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ - [中文文档](https://github.com/jdneo/vscode-leetcode/blob/master/docs/README_zh-CN.md) ## Requirements -- [VS Code 1.23.0+](https://code.visualstudio.com/) +- [VS Code 1.30.1+](https://code.visualstudio.com/) - [Node.js 8+](https://nodejs.org) > NOTE: Please make sure that `Node` is in your `PATH` environment variable. You can check this by running: `node -v`. @@ -70,7 +70,8 @@
-- Right click the problem in the `LeetCode Explorer` and select `Show Problem` will generate a new file with the problem description for you. +- Directly click on the problem or right click the problem in the `LeetCode Explorer` and select `Preview Problem` to see the problem description. +- Select `Show Problem` to directly open the file with the problem description. > Note: If no folder is opened in VS Code, the extension will save the problem files in **$HOME/.leetcode/**. @@ -78,6 +79,15 @@ --- +### Show Top Voted Solution ++ +
+ +- Select `Show Top Voted Solution` will display the top voted solution for you. + +--- + ### Submit the Answerdiff --git a/docs/README_zh-CN.md b/docs/README_zh-CN.md index 1c61d43b..fc66aeaf 100644 --- a/docs/README_zh-CN.md +++ b/docs/README_zh-CN.md @@ -20,7 +20,7 @@
-## Sponsor +## 赞助 [![coding](https://raw.githubusercontent.com/jdneo/vscode-leetcode/master/docs/imgs/sponsor_coding.jpg)](https://e.coding.net/?utm_source=leetcode) - [English Document](#Requirements) @@ -70,7 +70,8 @@ -- 在 `LeetCode Explorer` 中**右键**题目并选择 `Show Problem` 进行答题。 +- 直接点击题目或者在 `LeetCode Explorer` 中**右键**题目并选择 `Preview Problem` 可查看题目描述 +- 选择 `Show Problem` 可直接进行答题。 > 注意:若当前 VS Code 没有已打开的文件夹,则生成的题目文件会存储于 **$HOME/.leetcode/** 目录下。 @@ -78,6 +79,15 @@ --- +### 查看高票解答 ++ +
+ +- 选择 `Show Top Voted Solution` 可查看该题目在讨论区内的高票解答。 + +--- + ### 提交答案
diff --git a/docs/imgs/pick_problem.png b/docs/imgs/pick_problem.png
index c5a27d8f..1d4af3e3 100644
Binary files a/docs/imgs/pick_problem.png and b/docs/imgs/pick_problem.png differ
diff --git a/docs/imgs/solution.png b/docs/imgs/solution.png
new file mode 100644
index 00000000..526d3f66
Binary files /dev/null and b/docs/imgs/solution.png differ
diff --git a/package-lock.json b/package-lock.json
index 8031c3c4..a0ddf1e4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "vscode-leetcode",
- "version": "0.12.0",
+ "version": "0.13.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index f5fe00ea..5422dc54 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "vscode-leetcode",
"displayName": "LeetCode",
"description": "Solve LeetCode problems in VS Code",
- "version": "0.12.0",
+ "version": "0.13.0",
"author": "Sheng Chen",
"publisher": "shengchen",
"license": "MIT",
@@ -172,20 +172,19 @@
],
"view/item/context": [
{
- "command": "leetcode.showProblem",
+ "command": "leetcode.previewProblem",
"when": "view == leetCodeExplorer && viewItem == problem",
"group": "leetcode@1"
},
{
-
- "command": "leetcode.showSolution",
+ "command": "leetcode.showProblem",
"when": "view == leetCodeExplorer && viewItem == problem",
- "group": "leetcode@1"
+ "group": "leetcode@2"
},
{
- "command": "leetcode.previewProblem",
+ "command": "leetcode.showSolution",
"when": "view == leetCodeExplorer && viewItem == problem",
- "group": "leetcode@1"
+ "group": "leetcode@3"
}
],
"commandPalette": [
@@ -194,7 +193,6 @@
"when": "never"
},
{
-
"command": "leetcode.showSolution",
"when": "never"
},
diff --git a/thirdpartynotice.txt b/thirdpartynotice.txt
new file mode 100644
index 00000000..1f33cded
--- /dev/null
+++ b/thirdpartynotice.txt
@@ -0,0 +1,207 @@
+THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
+For vscode-leetcode extension
+
+This extension uses Open Source components. You can find the source code of their
+open source projects along with the license information below. We acknowledge and
+are grateful to these developers for their contribution to open source.
+
+1. fs-extra (https://github.com/jprichardson/node-fs-extra)
+2. highlight.js (https://github.com/highlightjs/highlight.js/)
+3. require-from-string (https://github.com/floatdrop/require-from-string)
+4. lodash (https://github.com/lodash/lodash)
+5. markdown-it (https://github.com/markdown-it/markdown-it)
+6. leetcode-cli (https://github.com/skygragon/leetcode-cli)
+
+fs-extra NOTICES BEGIN HERE
+=============================
+
+(The MIT License)
+
+Copyright (c) 2011-2017 JP Richardson
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
+(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
+ merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+END OF fs-extra NOTICES AND INFORMATION
+==================================
+
+highlight.js NOTICES BEGIN HERE
+=============================
+
+Copyright (c) 2006, Ivan Sagalaev
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of highlight.js nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+END OF highlight.js NOTICES AND INFORMATION
+==================================
+
+require-from-string NOTICES BEGIN HERE
+=============================
+
+The MIT License (MIT)
+
+Copyright (c) Vsevolod Strukchinsky