leetcode-editor
leetcode-editor copied to clipboard
LCR题目生成类的文件名存在空格
Describe the bug
LCR 题目生成的 .java 文件名存在空格
To Reproduce Steps to reproduce the behavior:
- 打开插件
- 搜索068
- 双击生成对应文件
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}) {}
搜索一下velocity replaceAll的语法或者使用VelocityTool.java把空格换成其他字符
c++可以用这个 $!velocityTool.toPinyinAndTrims(${question.frontendQuestionId})
$!velocityTool.deleteWhitespace(${question.frontendQuestionId}) 删除字符串所有空格
$!velocityTool.deleteWhitespace($!velocityTool.camelCaseName(${question.titleSlug}))