mirror of
https://github.com/Cp0204/quark-auto-save.git
synced 2026-01-17 18:30:43 +08:00
🐛 修复正则预览未读取自定义魔法匹配
This commit is contained in:
parent
668897d1df
commit
6079b95412
@ -282,6 +282,7 @@ def get_share_detail():
|
|||||||
regex.get("pattern", ""),
|
regex.get("pattern", ""),
|
||||||
regex.get("replace", ""),
|
regex.get("replace", ""),
|
||||||
regex.get("taskname", ""),
|
regex.get("taskname", ""),
|
||||||
|
regex.get("magic_regex", {}),
|
||||||
)
|
)
|
||||||
for item in share_detail["list"]:
|
for item in share_detail["list"]:
|
||||||
file_name = item["file_name"]
|
file_name = item["file_name"]
|
||||||
|
|||||||
@ -993,7 +993,8 @@
|
|||||||
regex: {
|
regex: {
|
||||||
pattern: this.formData.tasklist[this.fileSelect.index].pattern,
|
pattern: this.formData.tasklist[this.fileSelect.index].pattern,
|
||||||
replace: this.formData.tasklist[this.fileSelect.index].replace,
|
replace: this.formData.tasklist[this.fileSelect.index].replace,
|
||||||
taskname: this.formData.tasklist[this.fileSelect.index].taskname
|
taskname: this.formData.tasklist[this.fileSelect.index].taskname,
|
||||||
|
magic_regex: this.formData.magic_regex,
|
||||||
}
|
}
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
if (response.data.success) {
|
if (response.data.success) {
|
||||||
|
|||||||
@ -521,8 +521,8 @@ class Quark:
|
|||||||
# ↓ 操作函数
|
# ↓ 操作函数
|
||||||
|
|
||||||
# 魔法正则匹配
|
# 魔法正则匹配
|
||||||
def magic_regex_func(self, pattern, replace, taskname=None):
|
def magic_regex_func(self, pattern, replace, taskname=None, magic_regex={}):
|
||||||
magic_regex = CONFIG_DATA.get("magic_regex") or MAGIC_REGEX or {}
|
magic_regex = magic_regex or CONFIG_DATA.get("magic_regex") or MAGIC_REGEX
|
||||||
keyword = pattern
|
keyword = pattern
|
||||||
if keyword in magic_regex:
|
if keyword in magic_regex:
|
||||||
pattern = magic_regex[keyword]["pattern"]
|
pattern = magic_regex[keyword]["pattern"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user