Skip to content

!!! Bug: code format is not correct. Useless html tag is shown !!! #183

Closed
@kgfly

Description

@kgfly

Problem Summary

The downloaded code format is not correct. Useless html tag is shown

How to reproduce

I just reinstalled latest 2.6.2 because submit does not work in the old version.

cd
rm -fr .npm .nvm

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
$ source ~/.bashrc
$ nvm install --lts
$ npm install -g leetcode-cli
$ leetcode version

lee show 1 -gx -l python3

Observed:
In 1.two-sum.py

#
# @lc app=leetcode id=1 lang=python3
#
# [1] Two Sum
#
# https://leetcode.com/problems/two-sum/description/
#
# algorithms
# Easy (44.54%)
# Total Accepted:    2.1M
# Total Submissions: 4.8M
# Testcase Example:  '[2,7,11,15]\n9'
#
# <p>Given an array of integers, return <strong>indices</strong> of the two
# numbers such that they add up to a specific target.</p>
# 
# <p>You may assume that each input would have
# <strong><em>exactly</em></strong> one solution, and you may not use the
# <em>same</em> element twice.</p>
# 
# <p><strong>Example:</strong></p>
# 
# <pre>
# Given nums = [2, 7, 11, 15], target = 9,
# 
# Because nums[<strong>0</strong>] + nums[<strong>1</strong>] = 2 + 7 = 9,
# return [<strong>0</strong>, <strong>1</strong>].
# </pre>
# 
#
class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:

Expected:
I've an old copy downloaded by old version:


#
# @lc app=leetcode id=1 lang=python3
#
# [1] Two Sum
#
# https://leetcode.com/problems/two-sum/description/
#
# algorithms
# Easy (42.32%)
# Total Accepted:    1.6M
# Total Submissions: 3.7M
# Testcase Example:  '[2,7,11,15]\n9'
#
# Given an array of integers, return indices of the two numbers such that they
# add up to a specific target.
# 
# You may assume that each input would have exactly one solution, and you may
# not use the same element twice.
# 
# Example:
# 
# 
# Given nums = [2, 7, 11, 15], target = 9,
# 
# Because nums[0] + nums[1] = 2 + 7 = 9,
# return [0, 1].
# 
# 
# 
# 
#

In the newer version, lots of useless html, such as <p> <strong> ... is showing. Very annoying.

Environment

  • leetcode-cli version:
  • OS version: Ubuntu 18 LTS
  • Node version: v10.16.3
  • Npm version: 6.9.0

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions