1.18 effect at previous layer when folder named -1 | 文件夹名为 -1 时配置在上一层文件夹生效

This commit is contained in:
林万程
2022-06-08 23:15:14 +08:00
parent 6237f1dfa7
commit 0833f8f3cc
6 changed files with 24 additions and 5 deletions

View File

@@ -98,6 +98,15 @@ class ConfCacheGetUtils {
String[] paths = StringUtils.split(path, '/');
String[] confPaths = StringUtils.split(confPath, '/');
int length = confPaths.length;
String lastFolder = confPaths[length - 2];
if (lastFolder.startsWith("-")) {
try {
int i = Integer.parseInt(lastFolder);
length = length + i - 1;
} catch (NumberFormatException e) {
// ignore
}
}
if (length > paths.length) {
return 0;
}

View File

@@ -19,7 +19,7 @@
<li>path/[any][filename.]ext.tree.tsv // file and folder tree comment 📝 📁
<li>path/[any][filename.]ext.key.tsv // line keywords to split and comment
<li>path/[any][filename.]ext.doc.tsv // line words comment
<li>In path, "doc" can replace any, and can use % like in SQL
<li>In path, "doc" can replace any, and can use % like in SQL, effect at previous layer when folder named -1
<li>The lines in key.tsv will be concatenated with `|` to regexp; longer str should in front; startWith `?` to exclude
<li>Chang tsv file in find pop window would not reload!
<li>The tsv conf file must could be search in "Go to File"(Ctrl + Shift + N)
@@ -42,7 +42,7 @@
<li>path/[any][filename.]ext.key.tsv // 切割关键字与注释
<li>path/[any][filename.]ext.doc.tsv // 词注释
<li>key.tsv 的每一行将会用`|`连接起来形成正则表达式,较长的关键字应该放在前面,用 `?` 开头排除
<li>doc 文件夹可以替换任何一层文件夹,可以像 SQL 那样用 % 模糊匹配
<li>doc 文件夹可以替换任何一层文件夹,可以像 SQL 那样用 % 模糊匹配,文件夹名为 -1 时在上一层文件夹生效
<li>在搜索弹出窗中修改 tsv 文件将不会被重加载
<li>tsv 配置文件必须能被搜索(Ctrl + Shift + N)
</ul>