CLI: Ignore blank lines
This commit is contained in:
parent
6b79d8c5bb
commit
e9cc40f335
1 changed files with 3 additions and 0 deletions
|
@ -84,6 +84,9 @@ namespace MarkovGrams
|
|||
|
||||
IEnumerable<string> words = wordlistSource.ReadAllLines().SelectMany((string word) => {
|
||||
word = word.Trim();
|
||||
// No blank lines here!
|
||||
if (string.IsNullOrWhiteSpace(word)) return new string[] { };
|
||||
|
||||
if (convertLowercase)
|
||||
word = word.ToLower();
|
||||
if (splitOnWhitespace)
|
||||
|
|
Loading…
Reference in a new issue