diff options
author | Kenneth Heafield <github@kheafield.com> | 2018-05-03 12:28:11 +0300 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2018-05-03 12:28:11 +0300 |
commit | ae4746991928d61f833c35501236e1805b91ef06 (patch) | |
tree | 491d4ce5ea799d55a319c24067484ebd069713dc /scripts/ems/support | |
parent | 5a7c31e5d123ac6b785eee2ca4d03d255c55df07 (diff) |
Don't drop last character if file does not end with newline
Diffstat (limited to 'scripts/ems/support')
-rwxr-xr-x | scripts/ems/support/split-sentences.perl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/ems/support/split-sentences.perl b/scripts/ems/support/split-sentences.perl index 19d05d8e1..29b61695e 100755 --- a/scripts/ems/support/split-sentences.perl +++ b/scripts/ems/support/split-sentences.perl @@ -74,7 +74,7 @@ if (-e "$prefixfile") { ## Loop over text, add lines together until we get a blank line or a <p> my $text = ""; while (<STDIN>) { - chop; + chomp; if (/^<.+>$/ || /^\s*$/) { # Time to process this block; we've hit a blank or <p> &do_it_for($text, $_); |