tianyun 1 year ago
parent
commit
c195f506cf
1 changed files with 6 additions and 0 deletions
  1. 6 0
      simple-demo/send_memos.html

+ 6 - 0
simple-demo/send_memos.html

@@ -238,6 +238,10 @@
             updatedContent = `#${categories.join(' ')} ${content}`;
         }
 
+        // updatedContent 去除尾部的\n,可能有多个
+        updatedContent = updatedContent.replace(/\n+$/, '');
+
+
         // 调用数据备份接口
         const data = {
             content: updatedContent
@@ -277,6 +281,8 @@
     // 更新数据
     async function updateById() {
         let content = await deltaToMarkdown(quillModel.getContents());
+        content = content.replace(/\n+$/, '');
+
         let data = {
             id: tmpId,
             content: content