Skip to content

Commit 3bf5621

Browse files
authored
Add problem name into the solution output (#15)
1 parent eba8da3 commit 3bf5621

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

Diff for: .vscode/launch.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Launch Program",
11+
"program": "${workspaceFolder}/bin/leetcode",
12+
"args": ["show", "1", "--solution"]
13+
},
14+
{
15+
"type": "node",
16+
"request": "launch",
17+
"name": "Mocha Tests",
18+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
19+
"args": [
20+
"-u",
21+
"tdd",
22+
"--timeout",
23+
"999999",
24+
"--colors",
25+
"${workspaceFolder}/test/plugins"
26+
],
27+
"internalConsoleOptions": "openOnSessionStart"
28+
},
29+
]
30+
}

Diff for: lib/plugins/solution.discuss.js

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ plugin.getProblem = function(problem, cb) {
8383
var link = URL_DISCUSS.replace('$slug', problem.slug).replace('$id', solution.id);
8484
var content = solution.post.content.replace(/\\n/g, '\n').replace(/\\t/g, '\t');
8585

86+
log.info();
87+
log.info(problem.name);
8688
log.info();
8789
log.info(solution.title);
8890
log.info();

0 commit comments

Comments
 (0)