mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
🐛 Virtual reference keyword exclusion list does not work in certain cases https://github.com/siyuan-note/siyuan/issues/15252
This commit is contained in:
parent
ed6a90ab84
commit
bdc48a6d24
1 changed files with 6 additions and 2 deletions
|
|
@ -252,12 +252,16 @@ func getVirtualRefKeywords(root *ast.Node) (ret []string) {
|
||||||
if 0 < len(regexps) {
|
if 0 < len(regexps) {
|
||||||
tmp = nil
|
tmp = nil
|
||||||
for _, str := range ret {
|
for _, str := range ret {
|
||||||
|
matchExclude := false
|
||||||
for _, re := range regexps {
|
for _, re := range regexps {
|
||||||
if ok, regErr := regexp.MatchString(re, str); !ok && nil == regErr {
|
if ok, _ := regexp.MatchString(re, str); ok {
|
||||||
tmp = append(tmp, str)
|
matchExclude = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if !matchExclude {
|
||||||
|
tmp = append(tmp, str)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ret = tmp
|
ret = tmp
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue