feat: 优化打字机的显示效果

This commit is contained in:
huangzhe
2025-07-30 15:19:54 +08:00
parent 87d458ce83
commit cfe45551bb

View File

@@ -96,8 +96,8 @@ export default {
text = text.replace(/^<\w+>/g, '')
// 尝试把 </ 标签去除
// text = text.replace(/[</]+$/g, '')
text = text.replace(/<[^>]*>/g, '')
// console.log(text);
// <\/?([\w\s]+)?(?!>)$
text = text.replace(/<\/?([\w\s='"]+)?(?!>)$/g, '')
return text