This website works better with JavaScript.
Home
Explore
Help
Sign In
sbrl
/
MarkovGrams
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Activity
Browse Source
CLI: Ignore blank lines
master
Starbeamrainbowlabs
2 years ago
parent
6b79d8c5bb
commit
e9cc40f335
Signed by:
sbrl
GPG Key ID:
1BE5172E637709C2
1 changed files
with
3 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
MarkovGrams/Program.cs
+ 3
- 0
MarkovGrams/Program.cs
View File
@ -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
)
Write
Preview
Loading…
Cancel
Save