From 04b7ba96dbabea540f96ba7f72a220f067e9aaf8 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 18 Aug 2019 06:30:22 +0200 Subject: Improve doc extra --- doc/doc_extract.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'doc') 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 -- cgit v1.2.3