B2020-057 Handle bad RO links when converting ROs text

This commit is contained in:
John Jenko 2020-04-23 21:19:12 +00:00
parent 9e693b2ec8
commit af91094f94

View File

@ -3754,6 +3754,8 @@ namespace VEPROMS
string roid = nd.Attributes.GetNamedItem("roid").InnerText;
string findLink = @"<START\].*?\[END>";
content.Text = content.Text.Replace("<START]<START]", "<START]").Replace(@"[END><START]", @"[END>\v0 \v <START]"); //B2020-057 bad RO link - remove extra START and insert comment off/on between <END]<START]
content.Save();
MatchCollection ms = Regex.Matches(content.Text, findLink);
string lookFor = string.Format(@"^<START\](\\[^v \\]+)*\\v0(\\[^v '?{{}}~\\]+)*( |\\u[0-9]{{1,4}}?|\\'[0-9a-fA-F]{{2}}|\\[{{}}~])(.*?)(\\[^v'?{{}}~ \\]+)*\\v(\\[^v \\]+)* #Link:ReferencedObject:{0} .*?\[END>$", rousageid);
int lastIndex = 0;