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