Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何去除 waline 评论导入后的无用回复 @AT 标签 #124

Closed
penndu opened this issue Apr 24, 2022 · 10 comments
Closed

如何去除 waline 评论导入后的无用回复 @AT 标签 #124

penndu opened this issue Apr 24, 2022 · 10 comments
Labels
enhancement New feature or request

Comments

@penndu
Copy link

penndu commented Apr 24, 2022

image

@qwqcode
Copy link
Member

qwqcode commented Apr 25, 2022

🤔 我觉得这个可以删掉,可以用正则表达式删掉

@penndu
Copy link
Author

penndu commented Apr 25, 2022

thinking 我觉得这个可以删掉,可以用正则表达式删掉

那我都删掉吧!

@qwqcode
Copy link
Member

qwqcode commented Apr 25, 2022

我写了段 JS 正则表达式删除这个回复的,一会儿我加到 Artransfer 在线版里面,但是需要把 .artrans 重新数据库导一遍。

`<a href="#123456" clsss="test-class">@TEST USER</a>`.replace(/<a\s+(?:[^>]*?\s+)?href="#(\d+)?"[^>]*>@(.*?)<\/a>/ig, '')

@penndu
Copy link
Author

penndu commented Apr 25, 2022

我写了段 JS 正则表达式删除这个回复的,一会儿我加到 Artransfer 在线版里面,但是需要把 .artrans 重新数据库导一遍。

`<a href="#123456" clsss="test-class">@TEST USER</a>`.replace(/<a\s+(?:[^>]*?\s+)?href="#(\d+)?"[^>]*>@(.*?)<\/a>/ig, '')

非常感谢!

@qwqcode
Copy link
Member

qwqcode commented Apr 25, 2022

https://artransfer.netlify.app/

这里上传从 waline 导出的 .artrans 文件就可以删掉 @

image

@penndu
Copy link
Author

penndu commented Apr 25, 2022

https://artransfer.netlify.app/

这里上传从 waline 导出的 .artrans 文件就可以删掉 @

image

收到!

@qwqcode
Copy link
Member

qwqcode commented Apr 25, 2022

这个功能我之后直接加在 waline 导出 Artrans 的 Artransfer-CLI 里面

@penndu
Copy link
Author

penndu commented Apr 25, 2022

这个功能我之后直接加在 waline 导出 Artrans 的 Artransfer-CLI 里面

相信会有更多的人转来!

@qwqcode qwqcode changed the title 这种@的需要哪个参数,试了半天~泪目~ 如何去除 waline 评论导入后的无用回复 @AT 标签 Apr 25, 2022
qwqcode referenced this issue in ArtalkJS/Artransfer Apr 25, 2022
qwqcode referenced this issue in ArtalkJS/Artransfer-CLI Apr 25, 2022
@qwqcode
Copy link
Member

qwqcode commented Apr 25, 2022

看起来没什么问题,issue 就关闭咯~

@qwqcode qwqcode closed this as completed Apr 25, 2022
@penndu
Copy link
Author

penndu commented Apr 25, 2022

看起来没什么问题,issue 就关闭咯~

好嘞!

@qwqcode qwqcode added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants