Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow macro auto added into submit range #739

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/main/java/com/shuzijun/leetcode/plugin/model/Constant.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ public class Constant {
public static final String STATUS_SOLVED = "Solved";
public static final String STATUS_ATTEMPTED = "Attempted";

/**
* 默认模板
*/
public static final String CUSTOM_FILE_NAME = "[$!{question.frontendQuestionId}]${question.title}";
public static final String CUSTOM_TEMPLATE = "${question.content}\n\n${question.code}";

/**
* 提交代码标识 submit
*/
public static final String SUBMIT_REGION_BEGIN = "leetcode submit region begin(Prohibit modification and deletion)";
public static final String SUBMIT_REGION_END = "leetcode submit region end(Prohibit modification and deletion)";

/**
* 默认模板
*/
public static final String CUSTOM_FILE_NAME = "$!{question.frontendQuestionId}-${question.titleSlug}";
public static final String CUSTOM_TEMPLATE = "${question.content}\n//"+SUBMIT_REGION_BEGIN+"\n${question.code}\n//"+SUBMIT_REGION_END;
/**
* 配置文件版本记录
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ public String getCode() {
for (CodeSnippet codeSnippet : codeSnippets) {
if (codeType.getLangSlug().equals(codeSnippet.getLangSlug())) {
StringBuffer sb = new StringBuffer();
sb.append(codeType.getComment()).append(Constant.SUBMIT_REGION_BEGIN).append("\n");
// sb.append(codeType.getComment()).append(Constant.SUBMIT_REGION_BEGIN).append("\n");
sb.append(codeSnippet.getCode()).append("\n");
sb.append(codeType.getComment()).append(Constant.SUBMIT_REGION_END).append("\n");
// sb.append(codeType.getComment()).append(Constant.SUBMIT_REGION_END).append("\n");
return sb.toString();
}
}
Expand Down