shuzijun / leetcode-editor

Do Leetcode exercises in IDE, support leetcode.com and leetcode-cn.com, to meet the basic needs of doing exercises.Support theoretically: IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion GoLand DataGrip Rider MPS Android Studio
https://plugins.jetbrains.com/plugin/12132-leetcode-editor
Apache License 2.0
3.75k stars 402 forks source link

关于模板中${question.content}的用法 #531

Closed ghost closed 2 years ago

ghost commented 2 years ago

虽然现在每次手动改也不算麻烦,但是希望可以考虑支持一下这个

在使用${question.content}时,每行自动携带“//”,导致现在直接在文档注释中使用时如下: image

如果不带“//”,则可以做到如下效果,idea也可以缩起来看,比较清爽些 image image

shuzijun commented 2 years ago

配置里开启多行注释

ghost commented 2 years ago

配置里开启多行注释

多行和单行一样的问题,都无法适配在文档注释内,但是可以提出来单独自己算一个注释,也算清爽了,终于不用看一大片//了

shuzijun commented 2 years ago

${question.xxx}只是一个占位符,在渲染时替换成对应内容,无法识别到外面的内容进行适配。 另一个解决方案是可以在外面对这个内容进行再次加工,例如在头部加入其他内容

/** 题目编号:${question.frontendQuestionId} $!velocityTool.substring(${question.content},3)
gufeng0 commented 2 years ago

image

配置里开启多行注释

请问//leetcode submit region begin 和 //leetcode submit region end 能自动去掉吗,或者像您示例里面那样是--begin-- --end--

ghost commented 2 years ago

image

配置里开启多行注释

请问//leetcode submit region begin 和 //leetcode submit region end 能自动去掉吗,或者像您示例里面那样是--begin-- --end--

鼠标放上去,快捷键ctrl + -,就可以了

github-actions[bot] commented 2 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.