Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
修复无法识别多个双向链接的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Yimien committed Feb 28, 2024
1 parent d778fa6 commit 14194c1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v0.1.9

### 修复

1. 修复无法识别两个及以上双向链接的问题

## v0.1.8

### 优化
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "plugin-memos-sync",
"author": "Yimien",
"url": "https://github.com/Yimien/plugin-memos-sync.git",
"version": "0.1.8",
"version": "0.1.9",
"minAppVersion": "2.11.3",
"backends": [
"all"
Expand Down
7 changes: 5 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "@/index.scss";
import moment from "moment";

// 调试
const debug = false;
const debug = true;

// 固化数据
const STORAGE_NAME = "memos-sync-config"; // 配置名称
Expand Down Expand Up @@ -586,12 +586,15 @@ export default class MemosSync extends Plugin {
if (debug){
print("当前使用的文档ID", documentId);
}
content = content.replace(regex, (match) => `${documentId} "${match}"`)
content = content.replace(`((${documentName}))`, (match) => `((${documentId} "${match}"))`)
if (debug){
print("替换后的内容", content);
}
}
}
if (debug){
print("替换结果", content);
}
return content;
}

Expand Down

0 comments on commit 14194c1

Please sign in to comment.