vue-devui 1.6.32 → 1.6.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1491,7 +1491,11 @@ ToolBarHandler.file = (editor, params) => {
1491
1491
  ToolBarHandler.code = (editor) => {
1492
1492
  const cursor = editor.getCursor();
1493
1493
  const selection = editor.getSelection();
1494
- editor.replaceSelection("`" + selection + "`");
1494
+ if (selection.indexOf("\n") === -1) {
1495
+ editor.replaceSelection("`" + selection + "`");
1496
+ } else {
1497
+ editor.replaceSelection("```\n" + selection + "\n```");
1498
+ }
1495
1499
  editor.focus();
1496
1500
  if (selection === "") {
1497
1501
  editor.setCursor(cursor.line, cursor.ch + 1);
@@ -1780,7 +1784,7 @@ function locale(key) {
1780
1784
  file: "\u6587\u4EF6",
1781
1785
  table: "\u8868\u683C",
1782
1786
  link: "\u8D85\u94FE\u63A5",
1783
- code: "\u884C\u5185\u4EE3\u7801",
1787
+ code: "\u4EE3\u7801",
1784
1788
  codeblock: "\u4EE3\u7801\u5757",
1785
1789
  blockquote: "\u5F15\u7528",
1786
1790
  superscript: "\u4E0A\u6807",