skygragon / leetcode-cli

A cli tool to enjoy leetcode!
MIT License
3.64k stars 457 forks source link

Error line number is not correct. (vsc-leetcode-cli) #200

Open kgfly opened 4 years ago

kgfly commented 4 years ago

This is an issue of vsc-leetcode-cli (@jdneo). Since https://github.com/leetcode-tools/leetcode-cli does not have an issue tab, I report the issue here. ^_^

Problem Summary

Error line number is not correct when the source is download with "x"

How to reproduce

leetcode show 1316 -gx -l python3 (You don't need make change to the file) leetcode test 1316.distinct-echo-substrings.py

Observed: × Compile Error × Error: Line 3: IndentationError: expected an indented block × Error: Line 3: IndentationError: expected an indented block × Your Input: "abcabcabc" × Expected Answer: × Stdout:

Expected: Because I download the source with "x", the source code has a big comment part. The correct line number should be 47, instead of 3. This is very annoying.

Environment

Thanks.

kgfly commented 4 years ago

The issue is due to

@lc code=start

@lc code=end

@jdneo , is it possible to remove them from the downloaded code? or provide an extra option?