Fixed Replace Word logic with respect to hardspaces and rtf bold and underline commands
This commit is contained in:
parent
6953d5a88b
commit
d578f95922
@ -2057,7 +2057,15 @@ namespace Volian.Controls.Library
|
|||||||
if(Regex.IsMatch(begin,@"(\\(u160\?|'a0|~)(\\f[0-9]* ?)*(\\fs[0-9]* ?)*)$"))
|
if(Regex.IsMatch(begin,@"(\\(u160\?|'a0|~)(\\f[0-9]* ?)*(\\fs[0-9]* ?)*)$"))
|
||||||
return false;
|
return false;
|
||||||
// make sure that it is not followed by \u160? \'a0 or \~
|
// make sure that it is not followed by \u160? \'a0 or \~
|
||||||
if(Regex.IsMatch(end,@"^((\\f[0-9]* ?)*(\\fs[0-9]* ?)*\\(u160\?|'a0|~))"))
|
if (Regex.IsMatch(end, @"^((\\f[0-9]* ?)*(\\fs[0-9]* ?)*\\(u160\?|'a0|~))"))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Regex.IsMatch(begin, @"(\\(u160\?|'a0|~)(\\ulnone ?|\\b0 ?|\\ul ?|\\b ?)*)$"))
|
||||||
|
return false;
|
||||||
|
// make sure that it is not followed by \u160? \'a0 or \~
|
||||||
|
if (Regex.IsMatch(end, @"^(\\ulnone ?|\\b0 ?|\\ul ?|\\b ?)*\\(u160\?|'a0|~)"))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user