Skip to content

Commit

Permalink
last
Browse files Browse the repository at this point in the history
  • Loading branch information
stevencohn committed May 12, 2024
1 parent b1cdef6 commit 0cdd042
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion OneMore/Commands/Edit/CopyAsTextCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,15 @@ private void BuildText(bool all, XNamespace ns, XElement paragraph, StringBuilde
}
else
{
if (runs[runs.Count - 1].Parent.NextNode is null)
if (runs[0].Parent.PreviousNode is null &&
runs[runs.Count - 1].Parent.NextNode is null)
{
// whole paragraph selected so treat as a paragrah with EOL
builder.AppendLine(text);
}
else
{
// partial paragraph selected so only grab selected runs
builder.Append(text);
}
}
Expand Down

0 comments on commit 0cdd042

Please sign in to comment.