Commit cb76996b authored by Emmanuele Bassi's avatar Emmanuele Bassi
Browse files

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.
parent 1a713a4b
Pipeline #286076 passed with stage
in 1 minute and 44 seconds
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment