Skip to content

Commit

Permalink
fix issue Tencent#135
Browse files Browse the repository at this point in the history
  • Loading branch information
Maizify committed Dec 20, 2017
1 parent 17052b6 commit 24cf856
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
English | [简体中文](./CHANGELOG_CN.md)

#### V3.x.x (dev)
#### V3.1.0-dev (2017-12-xx)

- [FEATURE] Add `vConsole.showSwitch()` and `vConsole.hideSwitch()` methods, see [Public Properties & Methods](./doc/public_properties_methods.md).
- [FEATURE] Add `onReady` and `onClearLog` callback function to `vConsole.option`.
- [FEATURE] Auto clear logs when `console.clear()` is called.
- [FIX] Fix `\r` error when build in Windows.


#### V3.0.0 (2017-09-27)
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG_CN.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[English](./CHANGELOG.md) | 简体中文

#### V3.x.x (dev)
#### V3.1.0-dev (2017-12-xx)

- 【特性】新增 `vConsole.showSwitch()``vConsole.hideSwitch()` 方法,请查阅[公共属性及方法](./doc/public_properties_methods_CN.md)
- 【特性】新增 `onReady``onClearLog` 回调方法,位于 `vConsole.option`
- 【特性】调用 `console.clear` 时将自动清除面板中的日志。
- 【修复】修复 Windows 下构建引起的 `\r` 转义问题。


#### V3.0.0 (2017-09-27)
Expand Down
6 changes: 3 additions & 3 deletions dist/vconsole.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/lib/mito.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function render(tpl, data, toString) {
// remove spaces after switch
tpl = tpl.replace(/(\{\{ ?switch(.+?)\}\})[\r\n\t ]+\{\{/g, '$1{{');
// line breaks
tpl = tpl.replace(/^\n/, '').replace(/\n/g, '\\\n');
tpl = tpl.replace(/^[\r\n]/, '').replace(/\n/g, '\\\n').replace(/\r/g, '\\\r');
// init code
codeWrap = '(function(){\n';
code = 'var arr = [];\n';
Expand Down

0 comments on commit 24cf856

Please sign in to comment.