browser: convert windows line breaks in notes
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 3 Mar 2015 20:41:35 +0000 (21:41 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 9 Jun 2015 03:43:43 +0000 (05:43 +0200)
Fix trailing period detection.

browser.plp

index 5e359b40f14a76f14d1337be562bb04d7e800afa..652f6a957f6b6afee45b739ad6abe0bcbe51f46b 100644 (file)
@@ -300,6 +300,7 @@ sub featurescore {
 sub formatnotes {
        my @html = @_;
        for (@html) {
 sub formatnotes {
        my @html = @_;
        for (@html) {
+               s/\r\n?/\n/g;  # windows returns
                s/\h* $//gmx;  # trailing whitespace
                s/(?<= [^.\n]) $/./gmx;  # consistently end each line by a period
                Entity($_);
                s/\h* $//gmx;  # trailing whitespace
                s/(?<= [^.\n]) $/./gmx;  # consistently end each line by a period
                Entity($_);