leetcode-editor icon indicating copy to clipboard operation
leetcode-editor copied to clipboard

LCR题目生成类的文件名存在空格

Open DoubleW2w opened this issue 2 years ago • 4 comments

Describe the bug LCR 题目生成的 .java 文件名存在空格

To Reproduce Steps to reproduce the behavior:

  1. 打开插件
  2. 搜索068 image
  3. 双击生成对应文件 image

Software versions(Help -> About)

  • Product: IDEA 2023.2.1
  • Runtime version: 17.0.8+7-b1000.8 amd64
  • VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
  • OS: Windows 11

Additional 在插件配置中的,类名生成模板如下

public class Q$!{question.frontendQuestionId}$!velocityTool.camelCaseName(${question.titleSlug}) {}

DoubleW2w avatar Sep 12 '23 13:09 DoubleW2w

搜索一下velocity replaceAll的语法或者使用VelocityTool.java把空格换成其他字符

shuzijun avatar Sep 13 '23 03:09 shuzijun

c++可以用这个 $!velocityTool.toPinyinAndTrims(${question.frontendQuestionId})

yuhuoji avatar Sep 16 '23 13:09 yuhuoji

$!velocityTool.deleteWhitespace(${question.frontendQuestionId}) 删除字符串所有空格

ah-smile avatar Oct 12 '23 03:10 ah-smile

$!velocityTool.deleteWhitespace($!velocityTool.camelCaseName(${question.titleSlug}))

STHxiao avatar Oct 20 '23 04:10 STHxiao