Skip to content

Commit 37c9015

Browse files
committed
Do not assume index
1 parent 3670269 commit 37c9015

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DynamoCoreWpf/UI/GuidedTour/CustomRichTextBox.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ private static FlowDocument GetCustomDocument(string Text)
117117
//Finding the end character that indicates the hyperlink is complete (no empty spaces are allowed in hyperlink URL just in the name)
118118
if (word.Contains("="))
119119
{
120-
string linkURL = word.Split('=')[1];
121-
hyperlinkName += word.Split('=')[0];
120+
string linkURL = word.Split('=').LastOrDefault();
121+
hyperlinkName += word.Split('=').FirstOrDefault();
122122

123123
Run run3 = new Run(hyperlinkName.Replace("#", ""));
124124
Hyperlink link = new Hyperlink(run3);

0 commit comments

Comments
 (0)