Skip to content

Commit

Permalink
🐛 fix #10
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Dec 4, 2019
1 parent 4627f23 commit 4830c8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@
* [3](https://github.com/Vanessa219/vditor/issues/3) 编辑预览同步滚动改进 `enhancement`
* [4](https://github.com/Vanessa219/vditor/issues/4) 添加支持思维导图的功能 `enhancement`

### v1.10.5 / 2019-12-04
### v1.10.6 / 2019-12-04

* [11](https://github.com/Vanessa219/vditor/issues/11) 添加 CDN 配置 `enhancement`
* [10](https://github.com/Vanessa219/vditor/issues/10) block code 拷贝后变为 inline code `bug`
* [9](https://github.com/Vanessa219/vditor/issues/9) 没有预览界面时依旧出现预览耗时提示 `bug`
* [1](https://github.com/Vanessa219/vditor/issues/1) 上传时支持 xhr.setRequestHeader 设置 `enhancement`
* [172](https://github.com/b3log/vditor/issues/172) 上传改进 `enhancement`
Expand Down
2 changes: 1 addition & 1 deletion src/ts/util/processPasteCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const processPasteCode = (html: string, text: string, type: string = "mar
if (type === "wysiwyg") {
return `${code}`;
}
if (/\n/.test(code)) {
if (/\n/.test(code) || pres.length === 1) {
return "```\n" + code + "\n```";
} else {
return `\`${code}\``;
Expand Down

0 comments on commit 4830c8b

Please sign in to comment.