This commit is contained in:
@@ -176,7 +176,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
public class RtfLine : List<RtfPiece>
|
||||
{
|
||||
private static Regex _RegRtfText = new Regex(@"((\\[^'u ]*)+( |$))?(<START\]|#Link.*?\[END>|\\'[0-9a-fA-F]{2}|\\u[0-9]*\?|[^\\]{1}|$|)");
|
||||
private static Regex _RegRtfText = new Regex(@"((\\[^'u ]*|\\up[0-9]|\\ul0?)+( |$))?(<START\]|#Link.*?\[END>|\\'[0-9a-fA-F]{2}|\\u[0-9]*\?|[^\\]{1}|$|)");
|
||||
public RtfLine(string text)
|
||||
{
|
||||
MatchCollection matches = _RegRtfText.Matches(text);
|
||||
@@ -190,8 +190,11 @@ namespace Volian.Controls.Library
|
||||
//Console.WriteLine(text.Substring(nextIndex));
|
||||
}
|
||||
nextIndex = match.Index + match.Length;
|
||||
if (match.Groups[2].ToString().Length + match.Groups[4].ToString().Length > 0)
|
||||
this.Add(new RtfPiece(match.Groups[2].ToString(), match.Groups[4].ToString()));
|
||||
string rtfPart = match.Groups[1].ToString();
|
||||
if (match.Groups[1].ToString().TrimEnd(" ".ToCharArray()).Length + match.Groups[4].ToString().Length > 0)
|
||||
this.Add(new RtfPiece(match.Groups[1].ToString().TrimEnd(" ".ToCharArray()), match.Groups[4].ToString()));
|
||||
//if (match.Groups[1].ToString().Length + match.Groups[4].ToString().Length > 0)
|
||||
// this.Add(new RtfPiece(match.Groups[1].ToString(), match.Groups[4].ToString()));
|
||||
}
|
||||
}
|
||||
public RtfLine(int width, string left, string fill, string right)
|
||||
|
Reference in New Issue
Block a user