Skip to content

Commit

Permalink
Checking if PDF has a title for Morgan Stanley parser (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
akrupnov committed May 1, 2024
1 parent ad43998 commit 267b4f9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public IList<Transaction> Parse(string statementFilePath)
using var textSource = new TextSource(statementFilePath, true);
try
{
if (Regex.IsMatch(textSource.Title, @"^Morgan Stanley Smith Barney Document SP10 History Statements "))
if (Regex.IsMatch(textSource.Title ?? "", @"^Morgan Stanley Smith Barney Document SP10 History Statements "))
{
return ParseLegacyStatement(textSource);
}
else if (Regex.IsMatch(textSource.Title, @"^Morgan Stanley Smith Barney Document EPS217CCC linux-TTF New$"))
else if (Regex.IsMatch(textSource.Title ?? "", @"^Morgan Stanley Smith Barney Document EPS217CCC linux-TTF New$"))
{
return Parse2022Statement(textSource);
}
Expand Down

0 comments on commit 267b4f9

Please sign in to comment.