agent-loft 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -162,8 +162,8 @@ function watching(key: string): boolean {
|
|
|
162
162
|
return false;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
/** 通知正文用:去掉 markdown
|
|
166
|
-
export function plainPreview(text: string, max =
|
|
165
|
+
/** 通知正文用:去掉 markdown 记号,压成一行。40 字在 iPhone 通知收起时能完整显示 */
|
|
166
|
+
export function plainPreview(text: string, max = 40): string {
|
|
167
167
|
const plain = text
|
|
168
168
|
.replace(/```[\s\S]*?```/g, " [代码] ")
|
|
169
169
|
.replace(/!\[[^\]]*\]\([^)]*\)/g, " [图片] ")
|