private static string GenerateContentItemHtml(TaggedCheatNoteItem item) { // EXAMPLE: // <br/><p><a href="#top">[наверх]</a></p><h1><a name="{anchor}">{Position}. {Title}</h1><p>{Content}</p> var anchor = GetAnchor(item.Item.Position); return string.Format("{0}<h3><a name=\"{1}\">{2}. {3}</h3><p>{4}</p>", LinkToTop, anchor, item.Item.Position, item.Item.Title, item.Item.Content); }
private static string GenerateTableOfContentsItemHtml(TaggedCheatNoteItem item, string fileName, int? partNo) { if (item == null) { return string.Empty; } // EXAMPLE: // <p><a href="{fileName}{partNo}.html#{anchor}">{Position}. {Title}</a></p> var anchor = GetAnchor(item.Item.Position); var href = string.Format("{0}#{1}", GetPartFileName(fileName, partNo), anchor); return string.Format("<p><a href=\"{0}\">{1}. {2}</a></p>", href, item.Item.Position, item.Item.Title); }