mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 08:59:37 -05:00
Added Phenom's Patch Fix_NonBreakingSpace_0.6_7480.patch
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7486 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9f1f08b332
commit
ff366f0ec2
@ -345,7 +345,8 @@ static QString saveSpace(const QString text)
|
|||||||
bool outBrackets=false, echapChar=false;
|
bool outBrackets=false, echapChar=false;
|
||||||
QString keyName = "";
|
QString keyName = "";
|
||||||
bool getKeyName = false;
|
bool getKeyName = false;
|
||||||
|
bool firstOutBracket = false;
|
||||||
|
|
||||||
for(int i=0;i<savedSpaceText.length();i++){
|
for(int i=0;i<savedSpaceText.length();i++){
|
||||||
QChar cursChar=savedSpaceText.at(i);
|
QChar cursChar=savedSpaceText.at(i);
|
||||||
|
|
||||||
@ -356,20 +357,20 @@ static QString saveSpace(const QString text)
|
|||||||
keyName.append(cursChar.toLower());
|
keyName.append(cursChar.toLower());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cursChar==QLatin1Char('>')) {
|
if(cursChar==QLatin1Char('>')) {
|
||||||
if(!echapChar && i>0) outBrackets=true;
|
if(!echapChar && i>0) {outBrackets=true; firstOutBracket=true;}
|
||||||
} else if(cursChar==QLatin1Char('\t')) {
|
} else if(cursChar==QLatin1Char('\t')) {
|
||||||
if(outBrackets && (keyName!="style")) savedSpaceText.replace(i, 1, " ");
|
if(outBrackets && firstOutBracket && (keyName!="style")) savedSpaceText.replace(i, 1, " ");
|
||||||
} else if(cursChar==QLatin1Char(' ')) {
|
} else if(cursChar==QLatin1Char(' ')) {
|
||||||
if(outBrackets && (keyName!="style")) savedSpaceText.replace(i, 1, " ");
|
if(outBrackets && firstOutBracket && (keyName!="style")) savedSpaceText.replace(i, 1, " ");
|
||||||
} else if(cursChar==QChar(0xA0)) {
|
} else if(cursChar==QChar(0xA0)) {
|
||||||
if(outBrackets && (keyName!="style")) savedSpaceText.replace(i, 1, " ");
|
if(outBrackets && firstOutBracket && (keyName!="style")) savedSpaceText.replace(i, 1, " ");
|
||||||
} else if(cursChar==QLatin1Char('<')) {
|
} else if(cursChar==QLatin1Char('<')) {
|
||||||
if(!echapChar) {outBrackets=false; getKeyName=true; keyName.clear();}
|
if(!echapChar) {outBrackets=false; getKeyName=true; keyName.clear();}
|
||||||
}
|
} else firstOutBracket=false;
|
||||||
echapChar=(cursChar==QLatin1Char('\\'));
|
echapChar=(cursChar==QLatin1Char('\\'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return savedSpaceText;
|
return savedSpaceText;
|
||||||
|
Loading…
Reference in New Issue
Block a user