From: Radek Czajka <rczajka@rczajka.pl>
Date: Wed, 22 Apr 2020 11:16:32 +0000 (+0200)
Subject: Fixes #4010
X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/201f2a98ead96ca22a02015debdbbd9ac5deeb0f

Fixes #4010
---

diff --git a/src/annoy/static/annoy/book_text.js b/src/annoy/static/annoy/book_text.js
index bef1f13d6..bcc46f0ad 100644
--- a/src/annoy/static/annoy/book_text.js
+++ b/src/annoy/static/annoy/book_text.js
@@ -45,6 +45,10 @@
                 }
                 return inserts.length > 0;
             });
+	    /* Special case for short poems. */
+	    if (inserts && !counter) {
+		inserts[0].insertAfter($(".paragraph, .stanza").last());
+	    }
         };