public static string JoinUserSections(List<string> sections)
{
var sb = new StringBuilder();
for (int i = 0; i < sections.Count; i++)
{
if (i > 0)
{
// For subsequent sections, need to make sure we
// have a line break after the previous section.
string strPrev = sections[sections.Count - 1];
if (strPrev.Length > 0 && !strPrev.EndsWith("\n") && !strPrev.EndsWith("\r"))
sb.Append("\n");
sb.Append("\n===\n\n");
}
sb.Append(sections[i]);
}
return sb.ToString();
}