[gi-docgen] utils: Do not append a period unless we end with text
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gi-docgen] utils: Do not append a period unless we end with text
- Date: Wed, 26 May 2021 17:21:08 +0000 (UTC)
commit cb76996ba9ef7a1634ab9bde30c77c3bbb47c8db
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed May 26 18:18:11 2021 +0100
utils: Do not append a period unless we end with text
If the documentation block ends with something that is not a letter then
it's likely we're going to break something, like a code block marker.
gidocgen/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gidocgen/utils.py b/gidocgen/utils.py
index c32eecc..6ccc984 100644
--- a/gidocgen/utils.py
+++ b/gidocgen/utils.py
@@ -690,7 +690,7 @@ def preprocess_docs(text, namespace, summary=False, md=None, extensions=[], plai
# Append a period, if one isn't there already
last_line = processed_text[-1]
- if last_line and last_line[-1] != '.':
+ if last_line and last_line[-1].isalpha():
processed_text[-1] = ''.join([last_line, '.'])
if md is None:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]