skygragon/leetcode-cli

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

kgfly opened this issue · 1 comments

kgfly commented

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

  • leetcode-cli version: vsc-leetcode-cli@2.6.21
  • OS version: Windows 10
  • Node version: v12.14.1
  • Npm version: 6.13.4

Thanks.

kgfly commented

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?