Improve parsing & bug fixes

This commit is contained in:
azakhi
2018-08-20 01:35:49 +03:00
parent e5209fb459
commit 7fb9378304
3 changed files with 8 additions and 13 deletions

View File

@@ -59,7 +59,7 @@ namespace Filtration.ViewModels
{
string[] commentLines = ItemFilterCommentBlock.Comment.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
var titleOffset = 1;
if (commentLines.Length > 1 && (commentLines[0].StartsWith(@"============") || commentLines[0].StartsWith(@"------------")))
if (commentLines.Length > 1 && (commentLines[0].TrimStart(' ').StartsWith(@"============") || commentLines[0].TrimStart(' ').StartsWith(@"------------")))
{
titleOffset = 3;
commentLines[0] = commentLines[1];