This commit is contained in:
John Jenko 2011-05-06 15:39:02 +00:00
parent 55a7e2e2b6
commit 724fbcf62d

View File

@ -916,7 +916,7 @@ namespace Volian.Controls.Library
if (indx < 0) return indx; if (indx < 0) return indx;
// see if symbol (but not underline) or another rtf command: has a 'u' // see if symbol (but not underline) or another rtf command: has a 'u'
// followed by a non-underline or single quote, and if so, return it. // followed by a non-underline or single quote, and if so, return it.
if (((txt[indx + 1] == 'u' && txt[indx + 2] != 'l')) || (txt[indx + 1] == '\'')) return indx; if (((txt[indx + 1] == 'u' && txt[indx + 2] != 'l' && txt[indx + 2] !='p')) || (txt[indx + 1] == '\'')) return indx;
// see if link // see if link
if (txt[indx + 1] == 'v') return indx; //TODO - should have <START here too! if (txt[indx + 1] == 'v') return indx; //TODO - should have <START here too!
// Otherwise, get next index, must have been a slash or other rtf command. // Otherwise, get next index, must have been a slash or other rtf command.
@ -1128,7 +1128,11 @@ namespace Volian.Controls.Library
// the \v0 // the \v0
int linkIndx = text.IndexOf(@"#Link", index); int linkIndx = text.IndexOf(@"#Link", index);
int endStartTknIndx = text.IndexOf(@"\v0 ", index); int endStartTknIndx = text.IndexOf(@"\v0 ", index);
if (endStartTknIndx == -1)
endStartTknIndx = text.IndexOf(@"\v0", index);
int endTextIndx = text.IndexOf(@"\v ", endStartTknIndx); // find end of text int endTextIndx = text.IndexOf(@"\v ", endStartTknIndx); // find end of text
if (endTextIndx == -1)
endTextIndx = text.IndexOf(@"\v", endStartTknIndx);
int endTextIndx2 = text.IndexOf(@"\v\up0 ", endStartTknIndx); // find end of text int endTextIndx2 = text.IndexOf(@"\v\up0 ", endStartTknIndx); // find end of text
if(endTextIndx2 > 0 && (endTextIndx < 0 || endTextIndx > endTextIndx2)) if(endTextIndx2 > 0 && (endTextIndx < 0 || endTextIndx > endTextIndx2))
endTextIndx = endTextIndx2; endTextIndx = endTextIndx2;