diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-01-26 19:05:25 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-01-26 19:05:25 +0000 |
| commit | e2f25e57799dd9cd62a2b14b385a7f150ff885f9 (patch) | |
| tree | 53621512e07f301714514754ff7d7352eb8b2687 /docutils/utils/math | |
| parent | 7d5fe18783f0ee9151bf54bd25bba6fcfabead31 (diff) | |
| download | docutils-e2f25e57799dd9cd62a2b14b385a7f150ff885f9.tar.gz | |
Skip assigning to a variable when immediately returning
Patch by Adam Turner
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8980 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/utils/math')
| -rwxr-xr-x | docutils/utils/math/math2html.py | 3 | ||||
| -rw-r--r-- | docutils/utils/math/tex2mathml_extern.py | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/docutils/utils/math/math2html.py b/docutils/utils/math/math2html.py index 1e5b667c4..86333498b 100755 --- a/docutils/utils/math/math2html.py +++ b/docutils/utils/math/math2html.py @@ -1479,8 +1479,7 @@ class StringContainer(Container): return replaced def changeline(self, line): - line = self.escape(line, EscapeConfig.chars) - return line + return self.escape(line, EscapeConfig.chars) def extracttext(self): "Return all text." diff --git a/docutils/utils/math/tex2mathml_extern.py b/docutils/utils/math/tex2mathml_extern.py index b68ecc191..83855fa18 100644 --- a/docutils/utils/math/tex2mathml_extern.py +++ b/docutils/utils/math/tex2mathml_extern.py @@ -96,8 +96,7 @@ def ttm(math_code, reporter=None): if reporter and err.find('**** Error') >= 0 or not result: reporter.error(err) start, end = result.find('<math'), result.find('</math>')+7 - result = result[start:end] - return result + return result[start:end] def blahtexml(math_code, inline=True, reporter=None): """Convert LaTeX math code to MathML with blahtexml_ |
