mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-22 15:39:41 +08:00
修复导出时拍一拍的问题
This commit is contained in:
@@ -704,7 +704,7 @@ class ExportService {
|
||||
return revokeMatch[1].trim()
|
||||
}
|
||||
|
||||
// 3. 提取 pat 拍一拍消息
|
||||
// 3. 提取 pat 拍一拍消息(sysmsg 内的 template 格式)
|
||||
const patMatch = /<template><!\[CDATA\[(.*?)\]\]><\/template>/i.exec(content)
|
||||
if (patMatch) {
|
||||
// 移除模板变量占位符
|
||||
@@ -717,6 +717,15 @@ class ExportService {
|
||||
.trim()
|
||||
}
|
||||
|
||||
// 3.5 提取 <title> 内容(适用于 appmsg 格式的拍一拍等消息)
|
||||
const titleMatch = /<title>([\s\S]*?)<\/title>/i.exec(content)
|
||||
if (titleMatch) {
|
||||
const title = titleMatch[1].replace(/<!\[CDATA\[/g, '').replace(/\]\]>/g, '').trim()
|
||||
if (title) {
|
||||
return title
|
||||
}
|
||||
}
|
||||
|
||||
// 4. 处理 CDATA 内容
|
||||
content = content.replace(/<!\[CDATA\[/g, '').replace(/\]\]>/g, '')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user