nesdev.com
http://forums.nesdev.com/

Auto-strip quote when it's of entire previous message?
http://forums.nesdev.com/viewtopic.php?f=13&t=6483
Page 2 of 2

Author:  Dwedit [ Fri Jun 11, 2010 5:15 am ]
Post subject: 

So, you want something like a javascript enhanced Quote button that automatically uses the selected text when you click on the button?

Author:  blargg [ Fri Jun 11, 2010 5:19 am ]
Post subject: 

Uhhh, no. I could repeat what I've said a few times, but it's simpler to just refer you to the messages on the previous page. :)

Author:  tepples [ Fri Jun 11, 2010 5:29 am ]
Post subject: 

Let me explain in a manner that someone implementing this feature could understand:

Before adding a post N to a topic, read the recent post R from the topic. If N begins with a [quote] element, let Q be the inner markup of this element. If Q = R, remove this [quote] element from N before writing it to the database. For more robustness, case-fold and remove whitespace from Q and R before comparing them.

Page 2 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/