ネストされたクォートから部分的なクォートをパースする方法は?

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:

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日後に自動的に閉鎖されました。新しい返信は許可されていません。