如何从嵌套引号中解析部分引号?

Had the following situation pop up today:

User A:

And yes… It’s been dark times lately… Cursing is just what helps release the stress

User B:

Post from User A:
And yes… It’s been dark times lately… Cursing is just what helps release the stress

Also, he doesn’t discriminate to one form of communication… Just check his Tweets… He can also write it as he speaks it…

User C (Quotes User A, but via User B’s post):

Post from User B
And yes… It’s been dark times lately… Cursing is just what helps release the stress

So much hatred. Have you thought about going and talking to someone?

User B:

Hey User C! Somehow it looks like I wrote that!

User C:

Post from User B:
Hey User C! Somehow it looks like I wrote that!

I am so lost User B, who did what?

User C wasn’t malicious… They are just a less sophisticated user.

Suggestion here that when a quote only refers to a nested quote, the quoting used should refer to the original quote rather than the nested quote.

1 个赞

This is going to be hard to do, considering we can do this :arrow_down:

Why not teach your users to quote the original post instead of a quote insite another post? They can also quote from multiple posts if they want.

Interesting… I had always assumed the quote was actually validated… Didn’t realize that I could just have a pretend quote free for all…

Makes for a good litmus test… If someone purposely abuses quotes in that way, you know who to ban :wink:

Since the quotes aren’t validated, I see your point…

Thanks for considering :handshake:

1 个赞

We do validate the quotes (kinda), and attach a .quote-modified class to any which have been amended. Let’s see if it figures out the nested quotes:

Hmmm, no it doesn’t. I guess ‘technically’ that content is still part of @ryanerwin’s post. Quite tricky to resolve though. As @zogstrip already said the best way is to try and get your users to quote the original post.

3 个赞

They do quote correctly most of the time. For casual users, nested quotes can be pretty complicated… The “Quote whole post” button is very rarely used for us.

It’s just the real example that came up today, where an innocent but not extremely sophisticated user was just trying to make a quote, and the quote appeared as though it was from a different user…

That’s why I posted it here.

Mods can of course manually edit the post to fix it. And this can’t come up too terribly often. Just a thought to avoid an awkward situation that comes up occasionally :wink:

image

Here’s the actual post (names removed).
You can see how that being attributed to the opposite party in a debate comes across as pretty strange.

NOTE: feel free to delete the image in this post if it’s over the line for meta TOS… Just thought it best to provide a real example.

1 个赞

@eviltrout 如果修复起来不是特别复杂或棘手,我不介意有人接手这个问题;但如果确实非常复杂,那就直接放弃吧。

2 个赞

据我所知,上次我研究类似的问题(在摘要中使用 JavaScript 匹配嵌套标签)时,因为需要后向查找正则表达式而卡住了。不过,如果有比我更擅长正则表达式的人,说不定能想出一个可行的解决方案,这也不足为奇。

1 个赞

您不需要嵌套,只需向上查找最近的引用标题块即可。

1 个赞

@nbianca 最近看过类似的内容,所以我认为她可能是这个任务的好人选。

3 个赞

这已实现并如预期般运行。引用引用将保留原始帖子信息。请尝试引用上方的其中一条引用。:blush:

7 个赞

:tada: 似乎有效,因为我是从这里获取的:

3 个赞

此主题已在 4 天后自动关闭,不再接受新回复。