Skip to content

Commit

Permalink
Fix multiline backtick formatting in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
msanders committed Feb 9, 2020
1 parent 88d6cda commit b1e0e03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/scripts/sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def transform_docstring(self,
docstr = self._mono_re(r'[\w()]+').sub(self.sub_method, docstr)

# Treat `text` as monospace (like Markdown).
docstr = re.sub(r'([^:]|^)`(\S.*?)`', r'\1``\2``', docstr)
docstr = re.sub(r'([^:]|^)`(.*?)`', r'\1``\2``', docstr,
flags=re.MULTILINE | re.DOTALL)

# Automatically italicize "Exceptions:"
docstr = re.sub(r'(\b)(Exceptions:)', r'\1`\2`', docstr)
Expand Down

0 comments on commit b1e0e03

Please sign in to comment.