aboutsummaryrefslogtreecommitdiff
path: root/src/bible.cc
diff options
context:
space:
mode:
authorYour Name <you@example.com>2024-01-30 10:13:21 -0500
committerYour Name <you@example.com>2024-01-30 10:13:21 -0500
commit6c516699d7622c9aac91ef5a309b815a5005817b (patch)
tree34b764cb555502195fad5c5508bcab258fa875be /src/bible.cc
parentb26cf10a2ffcd353d527cc8786ae955810fe4652 (diff)
downloadlibbible-4effcc0199763015a96e28cef17bcfae661b59b2.tar.gz (sig)
libbible-4effcc0199763015a96e28cef17bcfae661b59b2.tar.bz2 (sig)
libbible-4effcc0199763015a96e28cef17bcfae661b59b2.zip (sig)
Fixed infinite loop at end of bible (Rev 22)v1.0.6
Diffstat (limited to 'src/bible.cc')
-rw-r--r--src/bible.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bible.cc b/src/bible.cc
index 0e555dc..7773732 100644
--- a/src/bible.cc
+++ b/src/bible.cc
@@ -310,6 +310,11 @@ int main(int argc, char* argv[]) {
if(omitVerseNums && tex.verse != verse) {
out << " ";
} else if(!omitVerseNums && tex.verse != verse) {
+ // First output any whitespace at the start of tex.text
+ for(auto c = tex.text.begin(); c != tex.text.end() and std::isspace(*c);) {
+ out << *c;
+ tex.text.erase(c);
+ }
if(superscript) {
out << " ";
map<char,string> d2s = {{'0', "⁰"}, {'1', "¹"}, {'2', "²"}, {'3', "³"}, {'4', "⁴"}, {'5', "⁵"}, {'6', "⁶"}, {'7', "⁷"}, {'8', "⁸"}, {'9', "⁹"}};