better handling of scenes with empty titles

closes #5
This commit is contained in:
Rudis Muiznieks 2017-12-28 17:42:33 -06:00
parent dbfd02ff96
commit 8210276c8e
No known key found for this signature in database
GPG Key ID: 1C290B51E05090F8
2 changed files with 3 additions and 2 deletions

View File

@ -58,7 +58,8 @@
private string ResolveDescription(PageState page)
{
var resolved = new StringBuilder();
resolved.AppendFormat("## {0}\n\n", page.Scene.Name);
if(!string.IsNullOrEmpty(page.Scene.Name))
resolved.AppendFormat("## {0}\n\n", page.Scene.Name);
var firstToggleCounter = 0;
for (var i = 0; i < page.State.ActionsToShow.Count; i++)

View File

@ -88,7 +88,7 @@ namespace Ficdown.Parser.Parser
{
Original = !string.IsNullOrEmpty(astr) ? astr : null,
Text = !string.IsNullOrEmpty(txstr) ? txstr : null,
Title = !string.IsNullOrEmpty(ttstr) ? ttstr : null,
Title = ttstr,
Href = ParseHref(hrefstr)
};
}