mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 虚拟引用关键字排除列表 支持正则表达式 https://github.com/siyuan-note/siyuan/issues/6696
This commit is contained in:
parent
04800fdaf3
commit
717f8f45b6
1 changed files with 2 additions and 2 deletions
|
|
@ -111,8 +111,8 @@ func getVirtualRefKeywords(docName string) (ret []string) {
|
||||||
ret = gulu.Str.ExcludeElem(ret, excludes)
|
ret = gulu.Str.ExcludeElem(ret, excludes)
|
||||||
if 0 < len(regexps) {
|
if 0 < len(regexps) {
|
||||||
tmp = nil
|
tmp = nil
|
||||||
for _, re := range regexps {
|
for _, str := range ret {
|
||||||
for _, str := range ret {
|
for _, re := range regexps {
|
||||||
if ok, regErr := regexp.MatchString(re, str); !ok && nil == regErr {
|
if ok, regErr := regexp.MatchString(re, str); !ok && nil == regErr {
|
||||||
tmp = append(tmp, str)
|
tmp = append(tmp, str)
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue