Skip to content

Commit 4ed7b52

Browse files
committed
1.add code custom; 2.add show content
1 parent 426cff2 commit 4ed7b52

File tree

8 files changed

+13
-6
lines changed

8 files changed

+13
-6
lines changed

CustomCode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
- [English Document]()
44
- [中文文档](https://github.com/shuzijun/leetcode-editor/blob/master/CustomCode_ZH.md)
55
<p align="center">
6-
<img src="https://raw.githubusercontent.com/shuzijun/leetcode-editor/dev/doc/customConfig-100.gif" alt="demo"/>
6+
<img src="https://raw.githubusercontent.com/shuzijun/leetcode-editor/master/doc/customConfig-100.gif" alt="demo"/>
77
</p>

CustomCode_ZH.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
- [English Document](https://github.com/shuzijun/leetcode-editor/blob/master/CustomCode.md)
44
- [中文文档](#配置)
55
<p align="center">
6-
<img src="https://raw.githubusercontent.com/shuzijun/leetcode-editor/dev/doc/customConfig-100.gif" alt="demo"/>
6+
<img src="https://raw.githubusercontent.com/shuzijun/leetcode-editor/master/doc/customConfig-100.gif" alt="demo"/>
77
</p>
88

99
## 配置
1010
<p align="center">
11-
<img src="https://raw.githubusercontent.com/shuzijun/leetcode-editor/dev/doc/customConfig.png" alt="customConfig"/>
11+
<img src="https://raw.githubusercontent.com/shuzijun/leetcode-editor/master/doc/customConfig.png" alt="customConfig"/>
1212
</p>
1313

1414
- **Custom code template**: 开启使用自定义模板,否则使用默认生成格式

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
## Local debugging
1818
<p align="center">
19-
<img src="https://raw.githubusercontent.com/shuzijun/leetcode-editor/dev/doc/customConfig-100.gif" alt="demo"/>
19+
<img src="https://raw.githubusercontent.com/shuzijun/leetcode-editor/master/doc/customConfig-100.gif" alt="demo"/>
2020
</p>
2121

2222
### Installation

README_ZH.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
## 本地调试
1717
<p align="center">
18-
<img src="https://raw.githubusercontent.com/shuzijun/leetcode-editor/dev/doc/customConfig-100.gif" alt="demo"/>
18+
<img src="https://raw.githubusercontent.com/shuzijun/leetcode-editor/master/doc/customConfig-100.gif" alt="demo"/>
1919
</p>
2020

2121
### 安装

doc/leetcode-editor-V5.0.zip

2.75 MB
Binary file not shown.
318 KB
Binary file not shown.

resources/lib/sentry-1.7.9.jar

152 KB
Binary file not shown.

src/com/shuzijun/leetcode/plugin/utils/VelocityUtils.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import org.apache.velocity.runtime.RuntimeConstants;
66

77
import java.io.StringWriter;
8+
import java.util.Properties;
89

910
/**
1011
* @author shuzijun
@@ -21,7 +22,13 @@ public class VelocityUtils {
2122
engine.setProperty(RuntimeConstants.PARSER_POOL_SIZE, 20);
2223
engine.setProperty(RuntimeConstants.INPUT_ENCODING, "UTF-8");
2324
engine.setProperty(RuntimeConstants.OUTPUT_ENCODING, "UTF-8");
24-
engine.init();
25+
26+
Properties props = new Properties();
27+
props.put("runtime.log.logsystem.class", "org.apache.velocity.runtime.log.SimpleLog4JLogSystem");
28+
props.put("runtime.log.logsystem.log4j.category", "velocity");
29+
props.put("runtime.log.logsystem.log4j.logger", "velocity");
30+
31+
engine.init(props);
2532
}
2633

2734
public static String convert(String template, Object data) {

0 commit comments

Comments
 (0)