ccagml / leetcode-extension

Solved LeetCode problem in VS Code added some new features
https://marketplace.visualstudio.com/items?itemName=ccagml.vscode-leetcode-problem-rating
MIT License
253 stars 27 forks source link

引入模板无效 #239

Closed windwhim closed 11 months ago

windwhim commented 11 months ago

🐛 Bug Report(错误报告)

引入默认模板配置无效,我使用的配置项为 "leetcode-problem-rating.includeTemplates": [ { "language": "cpp", "template": [ "using namespace std;", "#include <algorithm>", "#include <array>", "#include <bitset>", "#include <climits>", "#include <deque>", "#include <functional>", "#include <iostream>", "#include <list>", "#include <queue>", "#include <stack>", "#include <tuple>", "#include <unordered_map>", "#include <unordered_set>", "#include <utility>", "#include <vector>" ] } ],

To Reproduce(重现)

Expected behavior(预期行为)

正确引入模板

Extension Output(扩展输出)

{"code":100,"msg":{"url":"https://leetcode.cn/problems/powx-n/description/","category":"algorithms","difficulty":"Medium (37.97%)","likes":"1219","dislikes":"0","desc":"<p>实现&nbsp;<a href=\"https://www.cplusplus.com/reference/valarray/pow/\" target=\"_blank\">pow(<em>x</em>, <em>n</em>)</a>&nbsp;,即计算 <code>x</code> 的整数&nbsp;<code>n</code> 次幂函数(即,<code>x<sup>n</sup></code><sup><span style=\"font-size:10.8333px\"> </span></sup>)。</p>\n\n<p>&nbsp;</p>\n\n<p><strong class=\"example\">示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>x = 2.00000, n = 10\n<strong>输出:</strong>1024.00000\n</pre>\n\n<p><strong class=\"example\">示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>x = 2.10000, n = 3\n<strong>输出:</strong>9.26100\n</pre>\n\n<p><strong class=\"example\">示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong>x = 2.00000, n = -2\n<strong>输出:</strong>0.25000\n<strong>解释:</strong>2<sup>-2</sup> = 1/2<sup>2</sup> = 1/4 = 0.25\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>-100.0 &lt; x &lt; 100.0</code></li>\n\t<li><code>-2<sup>31</sup> &lt;= n &lt;= 2<sup>31</sup>-1</code></li>\n\t<li><code>n</code>&nbsp;是一个整数</li>\n\t<li>要么 <code>x</code> 不为零,要么 <code>n &gt; 0</code> 。</li>\n\t<li><code>-10<sup>4</sup> &lt;= x<sup>n</sup> &lt;= 10<sup>4</sup></code></li>\n</ul>\n"}}

Your Environment

windwhim commented 11 months ago

在问题代码上方发现了IncludeTemplates按钮,已解决此问题。 可否添加配置项使开始就导入模板。