Fixed logic which parses RTF to handle underline terminate followed by a hard space. This was causing an error for Braidwood.

This commit is contained in:
Rich 2014-09-29 20:12:27 +00:00
parent 791444d2bb
commit 912c11a65b

View File

@ -176,7 +176,7 @@ namespace Volian.Controls.Library
}
public class RtfLine : List<RtfPiece>
{
private static Regex _RegRtfText = new Regex(@"((\\[^'u ]*|\\up[0-9]|\\ul|\\ulnone)+( |$))?(<START\]|#Link.*?\[END>|\\'[0-9a-fA-F]{2}|\\u[0-9]*\?|[^\\]{1}|$|)");
private static Regex _RegRtfText = new Regex(@"((\\[^'u ]*|\\up[0-9]|\\ul|\\ulnone)+( |$|(?=\\['u])))?(<START\]|#Link.*?\[END>|\\'[0-9a-fA-F]{2}|\\u[0-9]*\?|[^\\]{1}|$|)");
public RtfLine(string text)
{
MatchCollection matches = _RegRtfText.Matches(text);