Page Index Toggle Pages: 1
Topic Tools
Normal Topic Cosmetic: Mark-and-Quote kills double spaces (Read 2,620 times)
Jet Li
Legacy Dev Team
Development Team
****
Offline



Posts: 6,588
Location: Hong Kong
Re: Cosmetic: Mark-and-Quote kills double spaces
Reply #4 - Mar 4th, 2010 at 4:02pm
Post Tools
New
public_html/yabbfiles/YaBB.js
in CVS.
  

PM me for YaBB Installation Service
Back to top
WWWGTalkFacebook  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Cosmetic: Mark-and-Quote kills double spaces
Reply #3 - Mar 4th, 2010 at 8:29am
Post Tools
So, as I posted above, if someone wants to just remove that line, it will fix this issue.  Jet, want to commit that change to CVS? Smiley
  
Back to top
WWW  
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Re: Cosmetic: Mark-and-Quote kills double spaces
Reply #2 - Feb 28th, 2010 at 10:11am
Post Tools
This is happening in yabbfiles/YaBB.js, within function get_selection, line 101:
Code
Select All
        while (quote_selection[msg_id].indexOf("  ") != -1) quote_selection[msg_id] = quote_selection[msg_id].replace(/  /gi, ""); 


I'm not entirely sure what the purpose of this line is... all it does is strip double-spaces, replacing them with the empty string.  I think this line can safely be removed... I've removed it on my test board with absolutely no ill effects.  Removing that line fixes this problem and doesn't seem to cause any others.

The lines immediately above and below this (lines 100 and 102) are commented out, and should probably also be removed - no need to clutter the files and increase load times.
« Last Edit: Feb 28th, 2010 at 10:15am by cepheid »  
Back to top
WWW  
IP Logged
 
Captain John
Ex Member


Re: Cosmetic: Mark-and-Quote kills double spaces
Reply #1 - Feb 27th, 2010 at 4:52pm
Post Tools
cepheid wrote on Feb 27th, 2010 at 10:03am:
It looks like, when doing a Mark-and-Quote, any double spaces (two spaces in a row) get entirely deleted.


cepheid wrote on Feb 27th, 2010 at 10:03am:
It looks like, when doing a Mark-and-Quote, any double spaces (two spaces in a row) get entirely deleted.Single spaces are preserved, but double spaces are deleted rather than simply collapsed.


verified
  
Back to top
 
IP Logged
 
cepheid
Senior Member
****
Offline



Posts: 516
Cosmetic: Mark-and-Quote kills double spaces
Feb 27th, 2010 at 10:03am
Post Tools
It looks like, when doing a Mark-and-Quote, any double spaces (two spaces in a row) get entirely deleted.  Single spaces are preserved, but double spaces are deleted rather than simply collapsed.  You can test that by doing a Mark-and-Quote on this paragraph.  All of these sentences are separated by double spaces, and all of those double spaces get zapped, while the single spaces between words are preserved.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top