aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrahiel <rahiel@protonmail.ch>2015-10-21 18:12:11 +0200
committerrahiel <rahiel@protonmail.ch>2015-10-21 18:12:11 +0200
commit2f6513483022b5305d14668c0d5d1833fb3cbe25 (patch)
treec9c84982e05d89cf8a0189a247a923275df26c10
parent9316349b5d30523edf62b8f2ed6fd77c697dc4bd (diff)
fix previous ayah on beginning of surah, add toc to readme
-rw-r--r--README.md11
-rwxr-xr-xquran.py2
2 files changed, 12 insertions, 1 deletions
diff --git a/README.md b/README.md
index f010755..716edbc 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,17 @@
BismillahBot is a bot on telegram to explore the Qur'an.
+<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again -->
+**Table of Contents**
+
+- [Usage](#usage)
+- [Installation](#installation)
+ - [Data files](#data-files)
+ - [Updating](#updating)
+- [License](#license)
+
+<!-- markdown-toc end -->
+
# Usage
The bot can be used by messaging
diff --git a/quran.py b/quran.py
index 03eb52d..f54c830 100755
--- a/quran.py
+++ b/quran.py
@@ -122,7 +122,7 @@ class Quran(object):
def getPreviousAyah(cls, s, a):
if a == 1:
s = s - 1 if s > 1 else 114
- a = 1
+ a = Quran.surah_lengths[s]
else:
a -= 1
return s, a