Skip to content

Commit

Permalink
更新文章中提供的正则表达式
Browse files Browse the repository at this point in the history
  • Loading branch information
Immortal-Sty committed Apr 1, 2024
1 parent eb333d2 commit d3cb3c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 10-Obsidian/Obsidian社区插件/update-relative-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ author: ImmortalSty
type: other
draft: false
editable: false
modified: 20240227171353
modified: 20240401125132
---

# Obsidian 插件:自动更新相对路径
Expand Down Expand Up @@ -116,7 +116,7 @@ Obsidian 的一大优势就是笔记完全由 Markdown 文件组成,不用担

其中“相对路径修复”下方的三个框分别填上:

1. `(?<=([^\\]|^)\[(([^\]\r\n]|\\\])*[^\\\]\r\n])?(\\\\)*\]\()\/?(?<link>([^\.\\\)\/\:\r\n\s]|\.[^\.\\\)\/\:\r\n\s]|\.\.[^\\\)\/\:\r\n\s]|\\[^\\\/\:\r\n\s])(([^\)\:\r\n\s]|\\\))*[^\\\)\:\r\n\s])?(\\\\)*|\.{1,2})(?=\))`
1. `(?<=([^\\]|^)\[(([^\]\r\n]|\\\])*[^\\\]\r\n])?(\\\\)*\]\()\/?(?<link>([^\.\\\)\/\:\#\r\n\s]|\.[^\.\\\)\/\:\r\n\s]|\.\.[^\\\)\/\:\r\n\s]|\\[^\\\/\:\r\n\s])(([^\)\:\r\n\s]|\\\))*[^\\\)\:\r\n\s])?(\\\\)*|\.{1,2})(?=\))`
2. `gm`
3. `./$<link>`

Expand Down

0 comments on commit d3cb3c9

Please sign in to comment.