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,6 +58,7 @@
private string ResolveDescription(PageState page) private string ResolveDescription(PageState page)
{ {
var resolved = new StringBuilder(); var resolved = new StringBuilder();
if(!string.IsNullOrEmpty(page.Scene.Name))
resolved.AppendFormat("## {0}\n\n", page.Scene.Name); resolved.AppendFormat("## {0}\n\n", page.Scene.Name);
var firstToggleCounter = 0; var firstToggleCounter = 0;

View File

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