Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0eccd9c

Browse files
author
luchenqun
committed
增加讨论快速链接
1 parent 2b2abaa commit 0eccd9c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lib/commands/show.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ function genFileName(problem, opts) {
9494
}
9595

9696
function showProblem(problem, argv) {
97+
problem.discuss = problem.link.replace("leetcode-cn.com", "leetcode.com").replace("description", "discuss");
98+
9799
const taglist = [problem.category]
98100
.concat(problem.companies || [])
99101
.concat(problem.tags || [])

templates/detailed.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<%= comment.line %> [<%= id %>] <%= name %>
33
<%= comment.line %>
44
<%= comment.line %> <%= link %>
5+
<%= comment.line %> <%= discuss %>
56
<%= comment.line %>
67
<%= comment.line %> <%= category %>
78
<%= comment.line %> <%= level %> (<%= percent %>%)

0 commit comments

Comments
 (0)