feat: supports importValue for more path formats (#1569)

`importValueRegex` now can match more path formats

Resolves: #1568
This commit is contained in:
Fyn
2022-02-25 11:16:57 +08:00
committed by GitHub
parent e0454138e0
commit db949e40f1
3 changed files with 28 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ import (
const (
versionRegex = `(?m)"v[1-9][0-9]*"`
importValueRegex = `(?m)"(/?[a-zA-Z0-9_#-])+\.api"`
importValueRegex = `(?m)"\/?(([a-zA-Z0-9.]+)+(\/?){1})+([a-zA-Z0-9]+)+\.api"`
tagRegex = `(?m)\x60[a-z]+:".+"\x60`
)