Skip to content

Commit cffe7af

Browse files
authored
Merge pull request #35 from hotoo/fix/hash28
fix: #28 markdown link progress error
2 parents 7a892f2 + ebc27ae commit cffe7af

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ autocmd BufWritePre *.markdown,*.md,*.text,*.txt,*.wiki,*.cnx call PanGuSpacing(
3636
3737
## 安装
3838

39+
via vim-plug
40+
41+
```viml
42+
Plug "hotoo/pangu.vim"
43+
```
44+
3945
via Vundle:
4046

4147
```

plugin/pangu.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ function! PanGuSpacingCore()
6060
silent! %s/\([a-zA-Z0-9!&;=\]\,\.\:\?\$\%\^\-\+\)\/\\]\)\([\u4e00-\u9fa5\u3040-\u30FF]\)/\1 \2/g " 汉字在后。
6161

6262
" 修复 markdown 链接所使用的标点。
63-
silent! %s/[『\[]\([^』\]]\+\)[』\]][『\[]\([^』\]]\+\)[』\]]/[\1][\2]/g " 参考链接
64-
silent! %s/[『\[]\([^』\]]\+\)[』\]][((]\([^』)]\+\)[))]/[\1](\2)/g " 内联链接
63+
silent! %s/[『[]\([^』\]]\+\)[』\]][『[]\([^』\]]\+\)[』\]]/[\1][\2]/g " 参考链接
64+
silent! %s/[『[]\([^』\]]\+\)[』\]][((]\([^』)]\+\)[))]/[\1](\2)/g " 内联链接
6565
" WiKi 链接:
6666
" - [『中文条目』] -> [[中文条目]]
6767
" - [[en 条目』] -> [[en 条目]]
6868
" - [『条目 en]] -> [[条目 en]]
69-
silent! %s/\[[『\[]\([^』\]]\+\)[』\]]\]/[[\1]]/g
69+
silent! %s/\[[『[]\([^』\]]\+\)[』\]]\]/[[\1]]/g
7070

7171
silent! %s/^ \[/[/
7272
silent! %s/\s\+$//

0 commit comments

Comments
 (0)