Skip to content

Commit 3b8c05c

Browse files
tenfyzhongianding1
authored andcommitted
Fix bugs caused by ianding1#47
1 parent ee56135 commit 3b8c05c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

autoload/leetcode.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ def get_problem(slug):
258258
body = {'query': '''query getQuestionDetail($titleSlug : String!) {
259259
question(titleSlug: $titleSlug) {
260260
questionId
261+
questionFrontendId
261262
title
262263
content
263264
stats
@@ -286,6 +287,7 @@ def get_problem(slug):
286287
soup = BeautifulSoup(content, features='html.parser')
287288
problem = {}
288289
problem['id'] = q['questionId']
290+
problem['fid'] = q['questionFrontendId']
289291
problem['title'] = q['title']
290292
problem['slug'] = slug
291293
problem['level'] = q['difficulty']

autoload/leetcode.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ function! leetcode#ResetSolution(with_latest_submission) abort
708708
call append('$', code)
709709
silent! normal! ggdd
710710

711-
let problem_desc_file_name = printf('[DESCRIPTION] %s.%s', problem['id'], problem_slug)
711+
let problem_desc_file_name = printf('[DESCRIPTION] %s.%s', problem['fid'], problem_slug)
712712
if buflisted(problem_desc_file_name)
713713
execute bufnr(problem_desc_file_name) . 'buffer'
714714
return

0 commit comments

Comments
 (0)