diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-08-18 06:30:22 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | 04b7ba96dbabea540f96ba7f72a220f067e9aaf8 (patch) | |
tree | d078f8bd3ed3ec884cb25b3b61ff454bfb401435 | |
parent | c1bea102df3f2907f345b89ff0f66f5055ac4767 (diff) |
Improve doc extra
-rwxr-xr-x | doc/doc_extract.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/doc/doc_extract.py b/doc/doc_extract.py index 1ce7dc9..ae44677 100755 --- a/doc/doc_extract.py +++ b/doc/doc_extract.py @@ -38,11 +38,9 @@ def extract_docs(filepath): break index += 6 - doc_name_end = len(file_content) - for i, c in enumerate(file_content[index:]): - if c == ')': - doc_name_end = index + i - break + doc_name_end = file_content.find(')', index) + if doc_name_end == -1: + doc_name_end = len(file_content) doc_name = file_content[index:doc_name_end] doc_name_end += 1 |