Skip to content

Commit

Permalink
Add problem name into the solution output (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdneo authored May 8, 2019
1 parent eba8da3 commit 3bf5621
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/bin/leetcode",
"args": ["show", "1", "--solution"]
},
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
"${workspaceFolder}/test/plugins"
],
"internalConsoleOptions": "openOnSessionStart"
},
]
}
2 changes: 2 additions & 0 deletions lib/plugins/solution.discuss.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ plugin.getProblem = function(problem, cb) {
var link = URL_DISCUSS.replace('$slug', problem.slug).replace('$id', solution.id);
var content = solution.post.content.replace(/\\n/g, '\n').replace(/\\t/g, '\t');

log.info();
log.info(problem.name);
log.info();
log.info(solution.title);
log.info();
Expand Down

0 comments on commit 3bf5621

Please sign in to comment.